mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
improved free space check in backup function
This commit is contained in:
parent
e9e3323c36
commit
1069543a18
1 changed files with 2 additions and 1 deletions
|
@ -376,7 +376,8 @@ local_backup(){
|
|||
fi
|
||||
|
||||
# Checking disk space
|
||||
disk_usage=$(df $BACKUP | awk '{print $5}'|tail -n1|cut -f 1 -d '%')
|
||||
disk_usage=$(df $BACKUP |tail -n1 |tr ' ' '\n' |grep % |cut -f 1 -d %)
|
||||
|
||||
if [ "$disk_usage" -ge "$BACKUP_DISK_LIMIT" ]; then
|
||||
echo "Error: Not enough disk space"
|
||||
log_event "$E_DISK" "$EVENT"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue