]> Frank Brehm's Git Trees - config/uhu1/etc.git/commitdiff
saving uncommitted changes in /etc prior to emerge run
authorfrank <frank@uhu1.uhu-banane.de>
Tue, 17 Jul 2012 10:33:42 +0000 (12:33 +0200)
committerroot <root@uhu1.uhu-banane.de>
Tue, 17 Jul 2012 10:33:42 +0000 (12:33 +0200)
.etckeeper
init.d/nrpe
nagios/nrpe.cfg

index 22a0bae098fd989e5ec5d8cf4962d9d2731bd7a5..1bb59375d60aaed236a9e5e732e6037e9d36a98b 100755 (executable)
@@ -867,9 +867,7 @@ maybe chmod 0755 './init.d/ndo2db'
 maybe chmod 0755 './init.d/net.lo'
 maybe chmod 0755 './init.d/netmount'
 maybe chmod 0755 './init.d/network'
-maybe chown nagios './init.d/nrpe'
-maybe chgrp nagios './init.d/nrpe'
-maybe chmod 0750 './init.d/nrpe'
+maybe chmod 0755 './init.d/nrpe'
 maybe chmod 0755 './init.d/nscd'
 maybe chmod 0755 './init.d/ntp-client'
 maybe chmod 0755 './init.d/ntpd'
index d83171e22facd4dcc88473f4edcfc7a3e00aed99..8032a30c47a6483be054f662dde0510e22a0d092 100755 (executable)
@@ -1,36 +1,22 @@
 #!/sbin/runscript
 
-opts="${opts} reload"
+extra_started_commands="reload"
+
+command="/usr/bin/nrpe"
+command_args="-c /etc/nagios/nrpe.cfg --daemon"
+pidfile="${pidfile:-/var/run/nrpe/nrpe.pid}"
+start_stop_daemon_args="--user nagios --group nagios"
 
 depend() {
        need net
 }
 
-start() {
-       ebegin "Starting nrpe"
-       start-stop-daemon --start --quiet --name nrpe \
-       --startas /usr/bin/nrpe \
-               -c nagios:nagios \
-               -- -c /etc/nagios/nrpe.cfg \
-               --daemon
-       eend $? "Failed to Start nrpe"
-}
-
-stop() {
-       ebegin "Stopping nrpe"
-       start-stop-daemon --stop --quiet -n nrpe
-       eend $? "Failed to Stop nrpe"
+start_pre() {
+       checkpath -d -m 0750 -o nagios:nagios /var/run/nrpe
 }
 
 reload() {
        ebegin "Reloading nrpe"
-       kill -HUP `pgrep nrpe | head -1`
+       kill -HUP $(head -n1 ${pidfile})
        eend $? "Failed to reload nrpe"
 }
-
-restart() {
-       ebegin "Restarting nrpe"
-       svc_stop
-       svc_start
-       eend $? "Failed to Restart nrpe"
-}
index e121a785565ec98e35beeaea320111098921a6de..d33b46bf0accc6f765181fd92dc2d26237dd02b8 100644 (file)
@@ -67,7 +67,9 @@ nrpe_group=nagios
 
 # ALLOWED HOST ADDRESSES
 # This is an optional comma-delimited list of IP address or hostnames 
-# that are allowed to talk to the NRPE daemon.
+# that are allowed to talk to the NRPE daemon. Network addresses with a bit mask
+# (i.e. 192.168.1.0/24) are also supported. Hostname wildcards are not currently 
+# supported.
 #
 # Note: The daemon only does rudimentary checking of the client's IP
 # address.  I would highly recommend adding entries in your /etc/hosts.allow