#!/bin/sh # # Startup script for the ups manager # # chkconfig: 345 85 15 # description: A sumple UPS manager # processname: ups # pidfile: /var/run/ups.pid # Source function library. . /etc/rc.d/init.d/functions # See how we were called. case "$1" in start) echo -n "Starting UPS manager: " daemon CheckUPS echo touch /var/lock/subsys/ups ;; stop) echo -n "Shutting down UPS manager: " killproc CheckUPS echo rm -f /var/lock/subsys/ups rm -f /var/run/ups.pid ;; status) status ups ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 esac exit 0