4
# Provides: mumble-server
5
# Required-Start: $network $local_fs $remote_fs
6
# Required-Stop: $network $local_fs $remote_fs
7
# Should-Start: $mysql dbus
8
# Should-Stop: $mysql dbus
9
# Default-Start: 2 3 4 5
11
# Short-Description: Mumble VoIP Server
12
# Description: init script for the Mumble VoIP Server murmurd.
15
PATH=/sbin:/bin:/usr/sbin:/usr/bin
17
DESC="Mumble VoIP Server"
19
PIDFILE=$PIDDIR/$NAME.pid
20
DAEMON=/usr/sbin/murmurd
24
test -x $DAEMON || exit 0
26
INIFILE=/etc/mumble-server.ini
27
DAEMON_OPTS="-ini $INIFILE"
29
MURMUR_USE_CAPABILITIES=0
32
# Include murmur defaults if available
33
if [ -f /etc/default/$NAME ] ; then
38
. /lib/lsb/init-functions
40
if [ "$MURMUR_LIMIT_NOFILE" -gt 0 ] ; then
41
ulimit -n $MURMUR_LIMIT_NOFILE
46
if [ "$MURMUR_DAEMON_START" != "1" ] ; then
47
log_warning_msg "Not starting $DESC $NAME, disabled via /etc/default/$NAME"
50
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
51
[ -d $PIDDIR ] || install -o $USER -d $PIDDIR
52
if [ "$MURMUR_USE_CAPABILITIES" != "1" ] ; then
53
start-stop-daemon --start --quiet \
55
--chuid $USER:$GROUP \
59
start-stop-daemon --start --quiet \
65
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
66
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
70
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
71
start-stop-daemon --stop --quiet \
72
--retry=TERM/30/KILL/5 \
78
[ "$VERBOSE" != no ] && log_end_msg 0
80
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
84
if start-stop-daemon --test --stop --quiet \
89
[ "$VERBOSE" != no ] && echo "$DESC is running."
92
[ "$VERBOSE" != no ] && echo "$DESC is not running"
97
start-stop-daemon --stop --test --quiet \
101
&& $0 restart || exit 0
104
[ "$VERBOSE" != no ] && log_daemon_msg "Restarting $DESC" "$NAME"
105
start-stop-daemon --stop --quiet \
106
--retry=TERM/30/KILL/5 \
112
[ -d $PIDDIR ] || install -o $USER -d $PIDDIR
114
if [ "$MURMUR_USE_CAPABILITIES" != "1" ] ; then
115
start-stop-daemon --start --quiet \
117
--chuid $USER:$GROUP \
121
start-stop-daemon --start --quiet \
127
0) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
128
*) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
132
[ "$VERBOSE" != no ] && log_end_msg 0
138
echo "Usage: $N {start|stop|restart|force-reload}" >&2