mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
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
6
.github/container/ejabberdctl.template
vendored
6
.github/container/ejabberdctl.template
vendored
@ -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
Block a user