ejabber-servis

This commit is contained in:
milisbir 2018-09-01 18:54:55 +03:00
parent e1b1be25e7
commit 32afa5ce6e
1 changed files with 6 additions and 5 deletions

View File

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