Skip to content

Commit 5ef49ea

Browse files
author
Kristan Kenney
committed
Add restart routine for IMAP_SYSTEM
1 parent 7c52a77 commit 5ef49ea

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

bin/v-restart-mail

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,17 @@ if [ -z "$MAIL_SYSTEM" ] || [ "$MAIL_SYSTEM" = 'remote' ]; then
4949
exit
5050
fi
5151

52-
# Restart system
53-
service $MAIL_SYSTEM restart >/dev/null 2>&1
52+
# Restart IMAP system if present
53+
if [ ! -z "$IMAP_SYSTEM" ]; then
54+
$BIN/v-restart-service $IMAP_SYSTEM > /dev/null 2>&1
55+
if [ $? -ne 0 ]; then
56+
send_email_report
57+
check_result $E_RESTART "$IMAP_SYSTEM restart failed"
58+
fi
59+
fi
60+
61+
# Restart mail system
62+
$BIN/v-restart-service $MAIL_SYSTEM >/dev/null 2>&1
5463
if [ $? -ne 0 ]; then
5564
send_email_report
5665
check_result $E_RESTART "$MAIL_SYSTEM restart failed"

0 commit comments

Comments
 (0)