8290f2ea11
[Thomas: - Adjust the comment about the dependency on erlang - Fix license to be 'GPLv2+ with OpenSSL exception' and not just 'GPLv2+' - Use double quotes instead of simple quotes in the .mk file. - Don't use the EJABBERD_MAKE_ENV variable, since it's not defined anywhere. - Remove the 0007-fix-init.patch patch, since we're not using the init script provided by ejabberd, and rename 0008-fix-install-permissions.patch to 0007-fix-install-permissions.patch.] Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
36 lines
605 B
Bash
36 lines
605 B
Bash
#!/bin/sh
|
|
#
|
|
# Start/stop ejabberd
|
|
#
|
|
|
|
USER=ejabberd
|
|
RUNDIR=/var/run/ejabberd
|
|
|
|
mkrundir() {
|
|
install -d -o $USER -g $USER $RUNDIR
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
mkrundir
|
|
echo "Starting ejabberd..."
|
|
ejabberdctl start
|
|
;;
|
|
stop)
|
|
echo -n "Stopping ejabberd... "
|
|
ejabberdctl stop > /dev/null
|
|
if [ $? -eq 3 ] || ejabberdctl stopped; then
|
|
echo "OK"
|
|
else
|
|
echo "failed"
|
|
fi
|
|
;;
|
|
restart|reload)
|
|
"$0" stop
|
|
"$0" start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
esac
|