Halt ejabberd if a command in CTL_ON_ fails during ejabberd startup
See processone/ejabberd-contrib#97
This commit is contained in:
parent
dcc8149f58
commit
ffbcf19156
|
@ -283,6 +283,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…
Reference in New Issue