#! /bin/sh # # chkconfig: 345 60 20 # processname: fan # Get functions . /etc/rc.d/init.d/functions # See how we were called. case "$1" in start) gprintf "Starting fan: " daemon /usr/local/bin/fan -d touch /var/lock/subsys/fan echo ;; stop) gprintf "Stopping fan: " killproc fan echo rm -f /var/lock/subsys/fan ;; status) status fan ;; restart) $0 stop $0 start ;; *) gprintf "Usage: %s {start|stop|status|restart}\n" "$0" exit 1 ;; esac exit 0