mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-01 01:00:03 +01:00
b21a979ee3
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
38 lines
525 B
Bash
38 lines
525 B
Bash
#!/bin/bash
|
|
# Start/stop/restart the ejabberd xmpp server
|
|
|
|
bin=/usr/sbin/ejabberdctl
|
|
|
|
start_ejabberd() {
|
|
echo "Starting ejabberd... "
|
|
$bin start
|
|
$bin started
|
|
}
|
|
|
|
stop_ejabberd() {
|
|
echo "Stoppping ejabberd... "
|
|
$bin stop
|
|
$bin stopped
|
|
}
|
|
|
|
restart_ejabberd() {
|
|
stop_ejabberd
|
|
start_ejabberd
|
|
}
|
|
|
|
status_ejabberd() {
|
|
$bin status
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start_ejabberd ;;
|
|
stop)
|
|
stop_ejabberd ;;
|
|
restart|reload)
|
|
restart_ejabberd ;;
|
|
status)
|
|
status_ejabberd ;;
|
|
*)
|
|
echo "usage $0 start|stop|restart|status"
|
|
esac
|