mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-11 01:27:17 +00:00
Stop the capture daemon during ehdd shutdown to avoid "busy" mount
This commit is contained in:
parent
402207714b
commit
3f2b2ef146
@ -9,6 +9,15 @@ if [ -s /etc/mailinabox.conf ]; then
|
|||||||
#systemctl stop nsd
|
#systemctl stop nsd
|
||||||
[ -x /usr/sbin/slapd ] && systemctl stop slapd
|
[ -x /usr/sbin/slapd ] && systemctl stop slapd
|
||||||
systemctl stop fail2ban
|
systemctl stop fail2ban
|
||||||
|
systemctl stop miabldap-capture
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ehdd/umount.sh
|
ehdd/umount.sh
|
||||||
|
code=$?
|
||||||
|
if [ $code -eq 2 ]; then
|
||||||
|
echo "Trying again in 10 seconds..."
|
||||||
|
sleep 10
|
||||||
|
ehdd/umount.sh
|
||||||
|
code=$?
|
||||||
|
fi
|
||||||
|
exit $code
|
||||||
|
@ -6,6 +6,6 @@ if ! mount | grep "$EHDD_MOUNTPOINT" >/dev/null; then
|
|||||||
# not mounted
|
# not mounted
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
umount "$EHDD_MOUNTPOINT" || exit 1
|
umount "$EHDD_MOUNTPOINT" || exit 2
|
||||||
cryptsetup luksClose $EHDD_LUKS_NAME
|
cryptsetup luksClose $EHDD_LUKS_NAME
|
||||||
losetup -d $(find_inuse_loop)
|
losetup -d $(find_inuse_loop)
|
||||||
|
Loading…
Reference in New Issue
Block a user