Skip to content

Instantly share code, notes, and snippets.

@tanordheim
Created May 1, 2011 12:15
Show Gist options
  • Save tanordheim/950462 to your computer and use it in GitHub Desktop.
Save tanordheim/950462 to your computer and use it in GitHub Desktop.
mumble init script
#! /bin/sh
test -f /lib/lsb/init-functions || exit 1
. /lib/lsb/init-functions
start() {
log_begin_msg "Starting Mumble Server 1"
/usr/bin/murmur.x86 -ini /etc/murmur/cfg1.ini || log_end_msg 1
log_end_msg 0
log_begin_msg "Starting Mumble Server 2"
/usr/bin/murmur.x86 -ini /etc/murmur/cfg2.ini || log_end_msg 1
log_end_msg 0
}
stop() {
log_begin_msg "Stopping Mumble servers"
/usr/bin/pkill murmur.x86 >/dev/null
log_end_msg 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 2
start
*)
log_success_msg "Usage: /etc/init.d/mumble {start|stop|restart}"
exit 1
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment