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