Difference between revisions of "Talk:Murmur Init Script"
(Adding a note about a bug in this init script, and also adding a slightly-modified version of the same.) |
(No difference)
|
Latest revision as of 20:07, 14 August 2007
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:
#!/bin/bash # # chkconfig: 35 90 12 # description: Murmur Service # processname: murmur # # Source function library. [ -f /etc/rc.d/init.d/functions ] || exit 0 . /etc/rc.d/init.d/functions RETVAL=0 PROG=/usr/local/bin/murmur ARGS="-ini /etc/murmur.ini" # Start the service Murmur start() { echo -n $"Starting Murmur server: " daemon --user murmur $PROG $ARGS RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/murmur return $RETVAL } # Restart the service Murmur stop() { echo -n $"Stopping Murmur server: " killproc murmur RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/murmur return $RETVAL } ### main logic ### 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 exit $RETVAL
SR 13:07, 14 August 2007 (PDT)