Created
January 11, 2014 11:06
-
-
Save MiLk/8369577 to your computer and use it in GitHub Desktop.
Nagios init script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start() { | |
test -x $exec || exit 5 | |
test -f $config || exit 6 | |
if test "$checkconfig" = "true"; then | |
check_config | |
fi | |
options="-d" | |
if test "$use_precached_objects" = "true"; then | |
options="$options -u" | |
fi | |
if test ! -z "$pidfile"; then | |
options="$options -F $pidfile" | |
fi | |
echo -n $"Starting $prog: " | |
# We need to _make sure_ the precache is there and verified | |
# Raise priority to make it run better | |
daemon --user=$user $exec $options $config | |
retval=$? | |
echo | |
test $retval -eq 0 && touch $lockfile | |
return $retval | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment