Halt ejabberd if a command in CTL_ON_ fails during ejabberd startup (#97)

pull/100/head
Badlop 11 months ago
parent 9361646acd
commit 72d317a02b

@ -280,6 +280,12 @@ post_waiter_loop()
TAIL=${LIST#* ; }
echo ":> ejabberdctl $HEAD"
$0 $HEAD
ctlstatus=$?
if [ $ctlstatus -ne 0 ] ; then
echo ":> FAILURE in command '$HEAD' !!! Stopping ejabberd..."
$0 halt > /dev/null
exit $ctlstatus
fi
[ "$HEAD" = "$TAIL" ] || post_waiter_loop $TAIL
}

Loading…
Cancel
Save