diff --git a/ehdd/shutdown.sh b/ehdd/shutdown.sh index 10db85b1..45356577 100755 --- a/ehdd/shutdown.sh +++ b/ehdd/shutdown.sh @@ -22,14 +22,19 @@ if [ -s /etc/mailinabox.conf ]; then systemctl stop miabldap-capture fi -ehdd/umount.sh -code=$? -tries=1 -while [ $code -eq 2 -a $tries -le 3 ]; do - echo "Trying again in 10 seconds..." - sleep 10 +if [ "$1" != "--no-umount" ]; then ehdd/umount.sh code=$? - let tries+=1 -done + tries=1 + while [ $code -eq 2 -a $tries -le 3 ]; do + echo "Trying again in 10 seconds..." + sleep 10 + ehdd/umount.sh + code=$? + let tries+=1 + done +else + code=0 +fi + exit $code diff --git a/tests/bin/restore_backup.sh b/tests/bin/restore_backup.sh index e797f367..dcaef8e5 100755 --- a/tests/bin/restore_backup.sh +++ b/tests/bin/restore_backup.sh @@ -62,7 +62,7 @@ if [ ! -d "$backup_files_dir" ]; then fi echo "Shutting down services" -ehdd/shutdown.sh || exit 1 +ehdd/shutdown.sh --no-umount || exit 1 if [ ! -x /usr/bin/duplicity ]; then echo "Installing duplicity"