aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/nagios/files/nagios.sh.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt/nagios/files/nagios.sh.tmpl')
-rw-r--r--net-mgmt/nagios/files/nagios.sh.tmpl71
1 files changed, 0 insertions, 71 deletions
diff --git a/net-mgmt/nagios/files/nagios.sh.tmpl b/net-mgmt/nagios/files/nagios.sh.tmpl
deleted file mode 100644
index 137deebbe9a8..000000000000
--- a/net-mgmt/nagios/files/nagios.sh.tmpl
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-#
-# Add the following lines to /etc/rc.conf to enable nagios:
-#
-#nagios_enable="YES"
-#
-
-. %%RC_SUBR%%
-
-name=nagios
-rcvar=`set_rcvar`
-
-prefix=%%PREFIX%%
-
-required_files=${prefix}/etc/nagios/nagios.cfg
-
-NagiosBin=${prefix}/bin/nagios
-NagiosCfg=${prefix}/etc/nagios/nagios.cfg
-NagiosVar=%%NAGIOSDIR%%
-NagiosLog=${NagiosVar}/status.log
-NagiosTmp=${NagiosVar}/nagios.tmp
-NagiosSav=${NagiosVar}/status.sav
-NagiosCmd=${NagiosVar}/rw/nagios.cmd
-NagiosRun=${NagiosVar}/nagios.lock
-
-pidfile=${NagiosRun}
-command=${NagiosBin}
-command_args="-d $NagiosCfg"
-nagios_user=%%NAGIOSUSER%%
-
-start_precmd=start_precmd
-stop_postcmd=stop_postcmd
-restart_precmd=nagios_checkconfig
-
-# set defaults
-
-nagios_enable=${nagios_enable:-"NO"}
-nagios_flags=${nagios_flags:-""}
-
-nagios_checkconfig()
-{
- echo -n 'Performing sanity check on Nagios configuration: '
- $NagiosBin -v $NagiosCfg > /dev/null 2>&1
- if [ $? != 0 ]; then
- echo 'FAILED.'
- echo "Use '$NagiosBin -v $NagiosCfg' command for details."
- return 1
- else
- echo 'OK.'
- fi
-}
-
-start_precmd()
-{
- nagios_checkconfig; [ $? != 0 ] && return 1
-
- su -m ${nagios_user} -c "touch ${NagiosVar}/nagios.log ${NagiosSav}"
- rm -f ${NagiosCmd}
-}
-
-stop_postcmd()
-{
- rm -f $NagiosLog $NagiosTmp $NagiosRun $NagiosCmd
-}
-
-load_rc_config $name
-run_rc_command "$1"