Update urlextractor_archiveteam.sh

This commit is contained in:
datechnoman 2023-12-05 11:34:29 +00:00
parent 0d5a54df43
commit 807f0136ad

View File

@ -1,5 +1,20 @@
#!/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")
gzip_file() {