Update urlextractor_archiveteam.sh
This commit is contained in:
parent
0d5a54df43
commit
807f0136ad
@ -1,5 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
check_disk_space() {
|
||||||
|
while true; do
|
||||||
|
available_space=$(df -BG /dev/sda1 | awk 'NR==2 {print $4}' | tr -d 'G')
|
||||||
|
if [ "$available_space" -ge 20 ]; then
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo "Waiting for more than 20GB free space on /dev/sda1. Current available space: ${available_space}GB"
|
||||||
|
sleep 300 # Sleep for 5 minutes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check for free disk space before proceeding
|
||||||
|
check_disk_space
|
||||||
|
|
||||||
directory=$(dirname "$0")
|
directory=$(dirname "$0")
|
||||||
|
|
||||||
gzip_file() {
|
gzip_file() {
|
||||||
|
Loading…
Reference in New Issue
Block a user