X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=nm.init;h=eda0f11f235076631d2008bb89fd219840d5630a;hb=8a17b5db4ca3827c077401993957f703b1347369;hp=ff6b000cad58456302bb49d6a2e94f29d13fcdd8;hpb=ad94963340281eea489836d4af037697b8b77eba;p=nodemanager.git diff --git a/nm.init b/nm.init index ff6b000..eda0f11 100755 --- a/nm.init +++ b/nm.init @@ -15,16 +15,16 @@ fi nm=${NM-"python /usr/share/NodeManager/nm.py"} prog="Node Manager" -restartoptions= +options=${OPTIONS-"-d -s"} +restartoptions=${RESTARTOPTIONS-"-d"} pidfile=${PIDFILE-/var/run/nm.pid} lockfile=${LOCKFILE-/var/lock/subsys/nm} RETVAL=0 do_start() { - options=$1 echo -n $"Starting $prog: " - daemon --check=nm $nm $options + daemon --check=nm $nm "$@" RETVAL=$? echo [ $RETVAL -eq 0 ] && touch ${lockfile} @@ -33,7 +33,7 @@ do_start() start() { - do_start ${OPTIONS-"-d -s"} + do_start $options } stop() @@ -48,32 +48,32 @@ stop() restart() { stop - do_start ${OPTIONS-"-d"} + do_start $restartoptions } case "$1" in start) - start - ;; + start + ;; stop) - stop - ;; + stop + ;; status) - status $nm - RETVAL=$? - ;; + status $nm + RETVAL=$? + ;; restart|reload) - restart - ;; + restart + ;; condrestart) - if [ -f ${pidfile} ] ; then - restart - fi - ;; + if [ -f ${pidfile} ] ; then + restart + fi + ;; *) - echo $"Usage: $0 {start|stop|restart|condrestart|status}" - exit 1 + echo $"Usage: $0 {start|stop|restart|condrestart|status}" + exit 1 esac exit 0