Only create the mount directory if it doesn't exist
This commit is contained in:
parent
860ae1a833
commit
970d6c3a7e
|
@ -1573,7 +1573,9 @@ function create_backup_script {
|
||||||
echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo "umount -f $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo "umount -f $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
|
echo "if [ ! -d $USB_MOUNT ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo " mkdir $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo " mkdir $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
|
echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo 'if [ -f /dev/mapper/encrypted_usb ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo 'if [ -f /dev/mapper/encrypted_usb ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo ' rm -rf /dev/mapper/encrypted_usb' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo ' rm -rf /dev/mapper/encrypted_usb' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
|
|
Loading…
Reference in New Issue