head 1.18; access; symbols OPENPKG_E1_MP_HEAD:1.18 OPENPKG_E1_MP:1.18 OPENPKG_E1_MP_2_STABLE:1.18.2.2 OPENPKG_E1_FP:1.18.2.2 OPENPKG_2_STABLE_MP:1.18 OPENPKG_2_STABLE_20061018:1.18.2.2 OPENPKG_2_STABLE:1.18.0.2 OPENPKG_CW_FP:1.14 OPENPKG_1_STABLE_MP:1.11; locks; strict; comment @# @; 1.18 date 2006.08.25.19.17.41; author rse; state Exp; branches 1.18.2.1; next 1.17; commitid Tvsj1UyQ8rQ89gKr; 1.17 date 2006.04.20.13.25.40; author rse; state Exp; branches; next 1.16; commitid kpaj2z6hRjgYhUtr; 1.16 date 2006.04.20.07.56.48; author rse; state Exp; branches; next 1.15; commitid rMdHi1UoqjCHtStr; 1.15 date 2006.03.03.20.45.55; author rse; state Exp; branches; next 1.14; commitid b4YMl6sbDmYchMnr; 1.14 date 2004.04.01.14.25.55; author thl; state Exp; branches; next 1.13; 1.13 date 2003.11.27.14.02.39; author ms; state Exp; branches; next 1.12; 1.12 date 2003.11.10.16.33.39; author ms; state Exp; branches; next 1.11; 1.11 date 2003.07.22.08.10.54; author rse; state Exp; branches; next 1.10; 1.10 date 2003.07.21.08.12.39; author thl; state Exp; branches; next 1.9; 1.9 date 2003.07.19.17.06.08; author rse; state Exp; branches; next 1.8; 1.8 date 2003.07.17.21.34.51; author thl; state Exp; branches; next 1.7; 1.7 date 2003.07.10.07.50.42; author rse; state Exp; branches; next 1.6; 1.6 date 2003.07.07.21.54.24; author thl; state Exp; branches; next 1.5; 1.5 date 2003.06.28.15.17.31; author rse; state Exp; branches; next 1.4; 1.4 date 2003.06.25.13.36.35; author thl; state Exp; branches; next 1.3; 1.3 date 2003.06.24.12.07.54; author thl; state Exp; branches; next 1.2; 1.2 date 2003.03.14.20.53.19; author rse; state Exp; branches; next 1.1; 1.1 date 2003.03.14.15.06.47; author ps; state Exp; branches; next ; 1.18.2.1 date 2006.08.25.19.17.41; author rse; state dead; branches; next 1.18.2.2; commitid iZxwRSmmWscPXUQr; 1.18.2.2 date 2006.10.16.14.53.07; author rse; state Exp; branches; next ; commitid iZxwRSmmWscPXUQr; desc @@ 1.18 log @replace '@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc' in shebang with '@@l_prefix@@/bin/openpkg rc' to allow people who run the rc.xxx scripts directly (as executables) to leverage from the Set-UID functionality @ text @#!@@l_prefix@@/bin/openpkg rc ## ## rc.nagios -- Run-Commands ## %config nagios_enable="$openpkg_rc_def" nagios_comment_file="@@l_prefix@@/var/nagios/log/comment.log" nagios_comment_prolog="true" nagios_comment_epilog="true" nagios_comment_numfiles="10" nagios_comment_minsize="1M" nagios_comment_complevel="9" nagios_downtime_file="@@l_prefix@@/var/nagios/log/downtime.log" nagios_downtime_prolog="true" nagios_downtime_epilog="true" nagios_downtime_numfiles="10" nagios_downtime_minsize="1M" nagios_downtime_complevel="9" nagios_nagios_file="@@l_prefix@@/var/nagios/log/nagios.log" nagios_nagios_prolog="true" nagios_nagios_epilog="true" nagios_nagios_numfiles="10" nagios_nagios_minsize="1M" nagios_nagios_complevel="9" %common nagios_cfgfile="@@l_prefix@@/etc/nagios/nagios.cfg" nagios_pidfile="@@l_prefix@@/var/nagios/run/nagios.pid" nagios_signal () { [ -f $nagios_pidfile ] && kill -$1 `cat $nagios_pidfile` } %status -u @@l_susr@@ -o nagios_usable="unknown" nagios_active="no" @@l_prefix@@/bin/nagios -v $nagios_cfgfile >/dev/null 2>&1 && \ nagios_usable="yes" rcService nagios enable yes && \ nagios_signal 0 && nagios_active="yes" echo "nagios_enable=\"$nagios_enable\"" echo "nagios_usable=\"$nagios_usable\"" echo "nagios_active=\"$nagios_active\"" %start -u @@l_susr@@ rcService nagios enable yes || exit 0 rcService nagios active yes && exit 0 @@l_prefix@@/bin/nagios -d $nagios_cfgfile >/dev/null 2>&1 %stop -u @@l_susr@@ rcService nagios enable yes || exit 0 rcService nagios active no && exit 0 nagios_signal TERM rm -f $nagios_pidfile 2>/dev/null || true %restart -u @@l_susr@@ rcService nagios enable yes || exit 0 rcService nagios active no && exit 0 rc nagios stop sleep 2 rc nagios start %reload -u @@l_susr@@ rcService nagios enable yes || exit 0 rcService nagios active no && exit 0 nagios_signal HUP %daily -u @@l_susr@@ rcService nagios enable yes || exit 0 shtool rotate -f \ -n ${nagios_nagios_numfiles} -s ${nagios_nagios_minsize} -d \ -z ${nagios_nagios_complevel} -o @@l_rusr@@ -g @@l_rgrp@@ -m 644 \ -P "${nagios_nagios_prolog}" \ -E "${nagios_nagios_epilog}" \ ${nagios_nagios_file} shtool rotate -f \ -n ${nagios_comment_numfiles} -s ${nagios_comment_minsize} -d \ -z ${nagios_comment_complevel} -o @@l_rusr@@ -g @@l_rgrp@@ -m 664 \ -P "${nagios_comment_prolog}" \ -E "${nagios_comment_epilog}" \ ${nagios_comment_file} shtool rotate -f \ -n ${nagios_downtime_numfiles} -s ${nagios_downtime_minsize} -d \ -z ${nagios_downtime_complevel} -o @@l_rusr@@ -g @@l_rgrp@@ -m 664 \ -P "${nagios_downtime_prolog}" \ -E "${nagios_downtime_epilog}" \ ${nagios_downtime_file} @ 1.18.2.1 log @file rc.nagios was added on branch OPENPKG_2_STABLE on 2006-10-16 14:53:07 +0000 @ text @d1 88 @ 1.18.2.2 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @a0 88 #!@@l_prefix@@/bin/openpkg rc ## ## rc.nagios -- Run-Commands ## %config nagios_enable="$openpkg_rc_def" nagios_comment_file="@@l_prefix@@/var/nagios/log/comment.log" nagios_comment_prolog="true" nagios_comment_epilog="true" nagios_comment_numfiles="10" nagios_comment_minsize="1M" nagios_comment_complevel="9" nagios_downtime_file="@@l_prefix@@/var/nagios/log/downtime.log" nagios_downtime_prolog="true" nagios_downtime_epilog="true" nagios_downtime_numfiles="10" nagios_downtime_minsize="1M" nagios_downtime_complevel="9" nagios_nagios_file="@@l_prefix@@/var/nagios/log/nagios.log" nagios_nagios_prolog="true" nagios_nagios_epilog="true" nagios_nagios_numfiles="10" nagios_nagios_minsize="1M" nagios_nagios_complevel="9" %common nagios_cfgfile="@@l_prefix@@/etc/nagios/nagios.cfg" nagios_pidfile="@@l_prefix@@/var/nagios/run/nagios.pid" nagios_signal () { [ -f $nagios_pidfile ] && kill -$1 `cat $nagios_pidfile` } %status -u @@l_susr@@ -o nagios_usable="unknown" nagios_active="no" @@l_prefix@@/bin/nagios -v $nagios_cfgfile >/dev/null 2>&1 && \ nagios_usable="yes" rcService nagios enable yes && \ nagios_signal 0 && nagios_active="yes" echo "nagios_enable=\"$nagios_enable\"" echo "nagios_usable=\"$nagios_usable\"" echo "nagios_active=\"$nagios_active\"" %start -u @@l_susr@@ rcService nagios enable yes || exit 0 rcService nagios active yes && exit 0 @@l_prefix@@/bin/nagios -d $nagios_cfgfile >/dev/null 2>&1 %stop -u @@l_susr@@ rcService nagios enable yes || exit 0 rcService nagios active no && exit 0 nagios_signal TERM rm -f $nagios_pidfile 2>/dev/null || true %restart -u @@l_susr@@ rcService nagios enable yes || exit 0 rcService nagios active no && exit 0 rc nagios stop sleep 2 rc nagios start %reload -u @@l_susr@@ rcService nagios enable yes || exit 0 rcService nagios active no && exit 0 nagios_signal HUP %daily -u @@l_susr@@ rcService nagios enable yes || exit 0 shtool rotate -f \ -n ${nagios_nagios_numfiles} -s ${nagios_nagios_minsize} -d \ -z ${nagios_nagios_complevel} -o @@l_rusr@@ -g @@l_rgrp@@ -m 644 \ -P "${nagios_nagios_prolog}" \ -E "${nagios_nagios_epilog}" \ ${nagios_nagios_file} shtool rotate -f \ -n ${nagios_comment_numfiles} -s ${nagios_comment_minsize} -d \ -z ${nagios_comment_complevel} -o @@l_rusr@@ -g @@l_rgrp@@ -m 664 \ -P "${nagios_comment_prolog}" \ -E "${nagios_comment_epilog}" \ ${nagios_comment_file} shtool rotate -f \ -n ${nagios_downtime_numfiles} -s ${nagios_downtime_minsize} -d \ -z ${nagios_downtime_complevel} -o @@l_rusr@@ -g @@l_rgrp@@ -m 664 \ -P "${nagios_downtime_prolog}" \ -E "${nagios_downtime_epilog}" \ ${nagios_downtime_file} @ 1.17 log @Complete overhaul of the Nagios packaging in order to finally get it working correctly under run-time. This includes a completely new and more compact from-scratch configuration and many packaging cleanups and bugfixes. Sponsored by: Cable & Wireless Telecommunication Services GmbH via OpenPKG GmbH @ text @d1 1 a1 1 #!@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc @ 1.16 log @packaging cleanups and a build fix @ text @a7 1 nagios_cfg="nagios.cfg" d28 2 a29 1 nagios_pidfile="@@l_prefix@@/var/nagios/nagios.lock" d34 1 a34 1 %status -u @@l_musr@@ -o d37 2 d45 1 a45 1 %start -u @@l_musr@@ d48 1 a48 1 @@l_prefix@@/bin/nagios -d @@l_prefix@@/etc/nagios/$nagios_cfg >/dev/null 2>&1 d50 1 a50 1 %stop -u @@l_musr@@ d56 1 a56 1 %restart -u @@l_musr@@ d63 1 a63 1 %reload -u @@l_musr@@ d68 1 a68 1 %daily -u @@l_musr@@ d72 1 a72 1 -z ${nagios_nagios_complevel} -o @@l_musr@@ -g @@l_mgrp@@ -m 644 \ d78 1 a78 1 -z ${nagios_comment_complevel} -o @@l_musr@@ -g @@l_mgrp@@ -m 664 \ d84 1 a84 1 -z ${nagios_downtime_complevel} -o @@l_musr@@ -g @@l_mgrp@@ -m 664 \ @ 1.15 log @adjust path of logfiles in OSSP fsl and run-command script to reflect path in config files; some packaging cosmetics @ text @a67 2 # rotate logfiles @ 1.14 log @import contributions from Cyrus Hamidi; add/require/fix OpenLDAP support @ text @d9 1 a9 1 nagios_comment_file="@@l_prefix@@/var/nagios/comment.log" d15 1 a15 1 nagios_downtime_file="@@l_prefix@@/var/nagios/downtime.log" d21 1 a21 1 nagios_nagios_file="@@l_prefix@@/var/nagios/nagios.log" @ 1.13 log @correct removal of pid files @ text @d46 1 a46 1 @@l_prefix@@/sbin/nagios -d @@l_prefix@@/etc/nagios/$nagios_cfg >/dev/null 2>&1 @ 1.12 log @PR #202, various basic corrections @ text @d52 1 a52 1 rm -f $nagios_pidfile @ 1.11 log @cleanup the priority: move 200 to 500 and because 500 is default just ommit it; fix DNS/NTP/etc. dependencies @ text @d9 18 a26 5 nagios_log_prolog="true" nagios_log_epilog="true" nagios_log_numfiles="10" nagios_log_minsize="1M" nagios_log_complevel="9" d28 16 a43 1 %start d45 1 d48 1 a48 1 %stop d50 3 a52 3 if [ -f @@l_prefix@@/var/nagios/nagios.pid ]; then kill -TERM `cat @@l_prefix@@/var/nagios/nagios.lock` fi d54 1 a54 1 %restart d56 4 a59 5 if [ -f @@l_prefix@@/var/nagios/nagios.pid ]; then kill -TERM `cat @@l_prefix@@/var/nagios/nagios.lock` sleep 2 fi @@l_prefix@@/bin/nagios -d @@l_prefix@@/etc/nagios/$nagios_cfg >/dev/null 2>&1 d61 1 a61 1 %reload -u @@l_susr@@ d63 2 a64 3 if [ -f @@l_prefix@@/var/nagios/nagios.pid ]; then kill -HUP `cat @@l_prefix@@/var/nagios/nagios.lock` fi d66 1 a66 1 %daily -u @@l_susr@@ d68 14 d83 5 a87 5 -n ${nagios_log_numfiles} -s ${nagios_log_minsize} -d \ -z ${nagios_log_complevel} -o @@l_rusr@@ -g @@l_rgrp@@ -m 644 \ -P "${nagios_log_prolog}" \ -E "${nagios_log_epilog}" \ @@l_prefix@@/var/nagios/nagios.log @ 1.10 log @PR#210: shtool options space before argument @ text @d15 1 a15 1 %start -p 200 d19 1 a19 1 %stop -p 200 @ 1.9 log @replace opXXXX with rcXXXX (PR#207) @ text @d42 2 a43 2 -n${nagios_log_numfiles} -s${nagios_log_minsize} -d \ -z${nagios_log_complevel} -o@@l_rusr@@ -g@@l_rgrp@@ -m644 \ @ 1.8 log @migrate opServiceEnabled to opService ... enable yes; use new bootstrap feature and apply opService short circuit to %env @ text @d16 1 a16 1 opService nagios enable yes || exit 0 d20 1 a20 1 opService nagios enable yes || exit 0 d26 1 a26 1 opService nagios enable yes || exit 0 d34 1 a34 1 opService nagios enable yes || exit 0 d40 1 a40 1 opService nagios enable yes || exit 0 @ 1.7 log @use new openpkg_rc_def variable in run-command scripts for allowing the admin to change the global default for xxx_enable @ text @d16 1 a16 1 opServiceEnabled nagios || exit 0 d20 1 a20 1 opServiceEnabled nagios || exit 0 d26 1 a26 1 opServiceEnabled nagios || exit 0 d34 1 a34 1 opServiceEnabled nagios || exit 0 d40 1 a40 1 opServiceEnabled nagios || exit 0 @ 1.6 log @rclint police: fix mandatory/wished trailing blank line missing @ text @d7 1 a7 1 nagios_enable="yes" @ 1.5 log @more clean ISO C; always use -p option; remove extra comment @ text @d47 1 @ 1.4 log @add/improve fsl support; fix typos; use openlog(2); inhibit use of plain log file @ text @a40 2 # rotate logfile @ 1.3 log @cosmetics: align/fix/unify rc header comment @ text @d9 5 d39 10 @ 1.2 log @cleanup and bugfix package @ text @d3 1 a3 1 ## rc.nagios -- Run-Commands for Nagios @ 1.1 log @Appending nagios @ text @d3 1 a3 1 ## rc.nagios -- Run-Commands for nagios d12 1 a12 2 @@l_prefix@@/sbin/nagios -d @@l_prefix@@/etc/nagios/$nagios_cfg \ >/dev/null 2>&1 d26 1 a26 3 @@l_prefix@@/bin/nagios \ -d @@l_prefix@@/etc/nagios/$nagios_cfg \ >/dev/null 2>&1 @