diff --git a/src/freedombone b/src/freedombone index cf68a75a..75618f4a 100755 --- a/src/freedombone +++ b/src/freedombone @@ -2585,7 +2585,24 @@ function create_backup_script { echo ' rm -rf $USB_MOUNT' >> /usr/bin/$BACKUP_SCRIPT_NAME echo ' exit 27' >> /usr/bin/$BACKUP_SCRIPT_NAME echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo -n 'used_percent=$(df -k $USB_MOUNT | ' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo -n "awk -F ' ' '{print " >> /usr/bin/$BACKUP_SCRIPT_NAME + echo -n '$5' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo -n "}' | " >> /usr/bin/$BACKUP_SCRIPT_NAME + echo -n "awk -F '%' '{print " >> /usr/bin/$BACKUP_SCRIPT_NAME + echo -n '$1' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo "}')" >> /usr/bin/$BACKUP_SCRIPT_NAME + echo 'if [ $used_percent -gt 95 ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo ' ' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo ' echo "Less than 5% of space remaining on backup drive"' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo ' umount $USB_MOUNT' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo ' rm -rf $USB_MOUNT' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo ' exit 6492' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo '# MariaDB password' >> /usr/bin/$BACKUP_SCRIPT_NAME echo -n 'DATABASE_PASSWORD=$(cat ' >> /usr/bin/$BACKUP_SCRIPT_NAME echo "$DATABASE_PASSWORD_FILE)" >> /usr/bin/$BACKUP_SCRIPT_NAME