blob: f08f3a56a2b11def93c7da63b669c643e8078c16 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/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 "Stopping ejabberd... "
$bin stop
$bin stopped
}
restart_ejabberd() {
stop_ejabberd
sleep 1
start_ejabberd
}
status_ejabberd() {
$bin status
}
reload-config_ejabberd() {
$bin reload_config
}
case "$1" in
start)
start_ejabberd ;;
stop)
stop_ejabberd ;;
restart|force-reload)
restart_ejabberd ;;
status)
status_ejabberd ;;
reload-config)
reload-config_ejabberd ;;
*)
echo "usage $0 start|stop|restart|force-reload|status|reload-config" ;;
esac
|