Talk:Murmur Init Script

Hi guys-- there's an error in your init script. On the line that reads: case "$1″ in The seceond double-quote is actually the wrong character and throws an error on my Fedora 7 box.

Also, for what it's worth, I wasn't comfortable running the murmur server as root, so I created a dummy "murmur" server with a nologin shell, and altered the init script like so, to more closely resemble a Fedora init script:
 * 1) !/bin/bash
 * 2) chkconfig: 35 90 12
 * 3) description: Murmur Service
 * 4) processname: murmur
 * 1) processname: murmur

[ -f /etc/rc.d/init.d/functions ] || exit 0 . /etc/rc.d/init.d/functions
 * 1) Source function library.

RETVAL=0 PROG=/usr/local/bin/murmur ARGS="-ini /etc/murmur.ini"

start { echo -n $"Starting Murmur server: " daemon --user murmur $PROG $ARGS RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/murmur return $RETVAL }
 * 1) Start the service Murmur

stop { echo -n $"Stopping Murmur server: " killproc murmur RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/murmur return $RETVAL }
 * 1) Restart the service Murmur

case "$1" in start)        start        ;;  stop) stop ;; status)        status murmur        ;;  restart|reload|condrestart) stop start ;; *)        echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"        exit 1 esac
 * 1) main logic ###

exit $RETVAL SR 13:07, 14 August 2007 (PDT)