Author: wolvverine Date: Mon Apr 6 15:49:53 2009 GMT Module: SOURCES Tag: HEAD ---- Log message: - for upsfid
---- Files affected: SOURCES: upsfid-server.init (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: SOURCES/upsfid-server.init diff -u /dev/null SOURCES/upsfid-server.init:1.1 --- /dev/null Mon Apr 6 17:49:53 2009 +++ SOURCES/upsfid-server.init Mon Apr 6 17:49:47 2009 @@ -0,0 +1,52 @@ +#!/bin/sh +# +# upsmons This shell script takes care of starting and stopping upsmons +# +# chkconfig: 12345 99 11 +# description: ups-management daemon for Fideltronik +# processname: upsmons +# +# pidfile: /var/run/upsmons.pid + +# Source function library. +. /etc/rc.d/init.d/functions + +RETVAL=0 +# See how we were called. +case "$1" in + start) + # Start daemons. + if [ ! -f /var/lock/subsys/upsmons ]; then + msg_starting upsmons + daemon upsmons + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/upsmons + else + msg_already_running upsmons + fi + ;; + stop) + if [ -f /var/lock/subsys/upsmons ]; then + # Stop daemons. + msg_stopping upsmons + killproc upsmons + rm -f /var/lock/subsys/upsmons >/dev/null 2>&1 + else + msg_not_running upsmons + fi + ;; + restart|force-reload) + $0 stop + $0 start + exit $? + ;; + status) + status upsmons + exit $? + ;; + *) + msg_usage "$0 {start|stop|restart|force-reload|status}" + exit 3 +esac + +exit $RETVAL ================================================================ _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit