- status -p $PID_FILE $DAEMON
+start() {
+ if [ -f $LOCK_FILE ]; then
-+ msg_already_running $NAME
++ msg_already_running "$NAME"
+ return
+ fi
-+ msg_starting $NAME
++ msg_starting "$NAME"
+ daemon /sbin/$DAEMON </dev/null
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch $LOCK_FILE
- rh_status >/dev/null 2>&1
+stop() {
+ if [ ! -f $LOCK_FILE ]; then
-+ msg_not_running $NAME
++ msg_not_running "$NAME"
+ return
+ fi
-+ msg_stopping $NAME
++ msg_stopping "$NAME"
+ killproc --pidfile $PID_FILE $DAEMON
+ rm -f $LOCK_FILE
}
- return $ret
+condrestart() {
+ if [ ! -f $LOCK_FILE ]; then
-+ msg_not_running $NAME
++ msg_not_running "$NAME"
+ RETVAL=$1
+ return
+ fi
- return $ret
+reload() {
+ if [ ! -f $LOCK_FILE ]; then
-+ msg_not_running $NAME
++ msg_not_running "$NAME"
+ RETVAL=7
+ return
+ fi
-+ msg_reloading $NAME
++ msg_reloading "$NAME"
+ killproc $DAEMON -HUP
+ RETVAL=$?
}
- status -p $PID_FILE $DAEMON
+start() {
+ if [ -f $LOCK_FILE ]; then
-+ msg_already_running $NAME
++ msg_already_running "$NAME"
+ return
+ fi
-+ msg_starting $NAME
++ msg_starting "$NAME"
+ daemon /sbin/$DAEMON </dev/null
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch $LOCK_FILE
- rh_status >/dev/null 2>&1
+stop() {
+ if [ ! -f $LOCK_FILE ]; then
-+ msg_not_running $NAME
++ msg_not_running "$NAME"
+ return
+ fi
-+ msg_stopping $NAME
++ msg_stopping "$NAME"
+ killproc --pidfile $PID_FILE $DAEMON
+ rm -f $LOCK_FILE
}
- return $ret
+condrestart() {
+ if [ ! -f $LOCK_FILE ]; then
-+ msg_not_running $NAME
++ msg_not_running "$NAME"
+ RETVAL=$1
+ return
+ fi
- return $ret
+reload() {
+ if [ ! -f $LOCK_FILE ]; then
-+ msg_not_running $NAME
++ msg_not_running "$NAME"
+ RETVAL=7
+ return
+ fi
-+ msg_reloading $NAME
++ msg_reloading "$NAME"
+ killproc $DAEMON -HUP
+ RETVAL=$?
}