The following changes were made:
* Moved crontab from usher into CONFIG * Modified init script to use status_of_proc from init-functions * Modified usher to use init script status to check if daemon running
This commit is contained in:
@@ -36,13 +36,7 @@ case "$1" in
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
pid=$(pidofproc -p "$PIDFILE" "$DAEMON")
|
||||
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "cron not running"
|
||||
else
|
||||
echo "cron running with PID: $pid"
|
||||
fi
|
||||
status_of_proc -p "$PIDFILE" "$DAEMON" || exit 1
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [start|stop|restart|status]"
|
||||
|
||||
Reference in New Issue
Block a user