1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-12 17:07:23 +01:00

restore backup: don't automatically unmount an ehdd drive

This commit is contained in:
downtownallday
2022-10-14 15:02:44 -04:00
parent 16679aa5ac
commit 1a0b94c878
2 changed files with 14 additions and 9 deletions

View File

@@ -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