diff --git a/src/freedombone b/src/freedombone index 23acfcb8..6b402836 100755 --- a/src/freedombone +++ b/src/freedombone @@ -2822,14 +2822,17 @@ function create_backup_script { echo '#!/bin/bash' > /usr/bin/$BACKUP_SCRIPT_NAME echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo "COMPLETION_FILE=$COMPLETION_FILE" >> /usr/bin/$BACKUP_SCRIPT_NAME + echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME echo "USB_DRIVE=$USB_DRIVE" >> /usr/bin/$BACKUP_SCRIPT_NAME echo 'if [ $1 ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME echo ' USB_DRIVE=/dev/${1}1' >> /usr/bin/$BACKUP_SCRIPT_NAME echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME echo "USB_MOUNT=$USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME - echo "ADMIN_USERNAME=$MY_USERNAME" >> /usr/bin/$BACKUP_SCRIPT_NAME - echo "MY_USERNAME=$MY_USERNAME" >> /usr/bin/$BACKUP_SCRIPT_NAME + echo -n 'ADMIN_USERNAME=$(cat $COMPLETION_FILE | grep "Admin user" | ' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo "awk -F ':' '{print $2}')" >> /usr/bin/$BACKUP_SCRIPT_NAME + echo 'MY_USERNAME=$ADMIN_USERNAME' >> /usr/bin/$BACKUP_SCRIPT_NAME echo 'if [ $2 ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME echo ' MY_USERNAME=$2' >> /usr/bin/$BACKUP_SCRIPT_NAME echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME