ejabber-servis

This commit is contained in:
milisbir 2018-09-01 18:05:00 +03:00
parent 123ba5b614
commit e1b1be25e7
1 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ RETVAL=0
start()
{
action "Starting ejabberd service: " \
echo "Starting ejabberd service: " \
"su -s /bin/sh -c '/usr/sbin/ejabberdctl start' -l ejabberd"
RETVAL=$?
[ "$RETVAL" -ne 0 ] || touch "$LOCKFILE"
@ -28,12 +28,12 @@ start()
stop()
{
action "Stopping ejabberd service: " \
echo "Stopping ejabberd service: " \
"su -s /bin/sh -c '/usr/sbin/ejabberdctl stop' -l ejabberd"
RETVAL=$?
[ $RETVAL -eq 0 ] || return
sleep 3
action "Stopping erlang portmapper: " epmd -kill
echo "Stopping erlang portmapper: " epmd -kill
RETVAL=$?
[ "$RETVAL" -ne 0 ] || rm -f -- "$LOCKFILE"
return $RETVAL