From: | "Tobias Scherbaum (dertobi123)" <dertobi123@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-analyzer/nagios-core/files: 99_nagios3.conf lighttpd_nagios3.conf nagios3 |
Date: | Sun, 27 Apr 2008 18:41:28 |
Message-Id: | E1JqBoT-0005YQ-Vp@stork.gentoo.org |
1 | dertobi123 08/04/27 18:41:25 |
2 | |
3 | Added: 99_nagios3.conf lighttpd_nagios3.conf nagios3 |
4 | Log: |
5 | bump for nagios-3 |
6 | (Portage version: 2.1.5_rc6) |
7 | |
8 | Revision Changes Path |
9 | 1.1 net-analyzer/nagios-core/files/99_nagios3.conf |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/files/99_nagios3.conf?rev=1.1&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/files/99_nagios3.conf?rev=1.1&content-type=text/plain |
13 | |
14 | Index: 99_nagios3.conf |
15 | =================================================================== |
16 | <IfDefine NAGIOS> |
17 | ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/ |
18 | <Directory "/usr/lib/nagios/cgi-bin/"> |
19 | AllowOverride AuthConfig |
20 | Options ExecCGI |
21 | Order allow,deny |
22 | Allow from all |
23 | </Directory> |
24 | Alias /nagios /usr/share/nagios/htdocs |
25 | <Directory "/usr/share/nagios/htdocs"> |
26 | AllowOverride AuthConfig |
27 | Order allow,deny |
28 | Allow from all |
29 | </Directory> |
30 | </IfDefine> |
31 | |
32 | |
33 | |
34 | 1.1 net-analyzer/nagios-core/files/lighttpd_nagios3.conf |
35 | |
36 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/files/lighttpd_nagios3.conf?rev=1.1&view=markup |
37 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/files/lighttpd_nagios3.conf?rev=1.1&content-type=text/plain |
38 | |
39 | Index: lighttpd_nagios3.conf |
40 | =================================================================== |
41 | server.modules += ("mod_cgi") |
42 | server.modules += ("mod_auth") |
43 | |
44 | auth.require = ( "/nagios" => |
45 | ( |
46 | "method" => "digest", |
47 | "realm" => "nagios", |
48 | "require" => "valid-user", |
49 | ) |
50 | ) |
51 | |
52 | $HTTP["url"] =~ "^/nagios/cgi-bin/" { |
53 | dir-listing.activate = "disable" |
54 | cgi.assign = ( |
55 | ".pl" => "/usr/bin/perl", |
56 | ".cgi" => "" |
57 | ) |
58 | } |
59 | |
60 | alias.url += ( |
61 | "/nagios/cgi-bin" => "/usr/lib/nagios/cgi-bin", |
62 | "/nagios" => "/usr/share/nagios/htdocs" |
63 | ) |
64 | |
65 | |
66 | |
67 | 1.1 net-analyzer/nagios-core/files/nagios3 |
68 | |
69 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/files/nagios3?rev=1.1&view=markup |
70 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/files/nagios3?rev=1.1&content-type=text/plain |
71 | |
72 | Index: nagios3 |
73 | =================================================================== |
74 | #!/sbin/runscript |
75 | # Copyright 1999-2004 Gentoo Foundation |
76 | # Distributed under the terms of the GNU General Public License v2 |
77 | # $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/files/nagios3,v 1.1 2008/04/27 18:41:25 dertobi123 Exp $ |
78 | |
79 | opts="${opts} reload checkconfig" |
80 | |
81 | depend() { |
82 | need net |
83 | use dns logger firewall |
84 | after mysql postgresql |
85 | } |
86 | |
87 | reload() |
88 | { |
89 | checkconfig || return 1 |
90 | ebegin "Reloading configuration" |
91 | killall -HUP nagios &>/dev/null |
92 | eend $? |
93 | } |
94 | |
95 | checkconfig() { |
96 | # Silent Check |
97 | /usr/sbin/nagios -v /etc/nagios/nagios.cfg &>/dev/null && return 0 |
98 | |
99 | # Now we know there's problem - run again and display errors |
100 | /usr/sbin/nagios -v /etc/nagios/nagios.cfg |
101 | eend $? "Configuration Error. Please fix your configfile" |
102 | } |
103 | |
104 | start() { |
105 | checkconfig || return 1 |
106 | ebegin "Starting nagios" |
107 | touch /var/nagios/nagios.log /var/nagios/status.sav |
108 | chown nagios:nagios /var/nagios/nagios.log /var/nagios/status.sav |
109 | rm -f /var/nagios/rw/nagios.cmd |
110 | start-stop-daemon --quiet --start --startas /usr/sbin/nagios \ |
111 | -e HOME="/var/nagios/home" --pidfile /var/nagios/nagios.lock \ |
112 | -- -d /etc/nagios/nagios.cfg |
113 | eend $? |
114 | } |
115 | |
116 | stop() { |
117 | ebegin "Stopping nagios" |
118 | start-stop-daemon --quiet --stop --pidfile /var/nagios/nagios.lock |
119 | rm -f /var/nagios/status.log /var/nagios/nagios.tmp /var/nagios/nagios.lock /var/nagios/rw/nagios.cmd |
120 | eend $? |
121 | } |
122 | |
123 | svc_restart() { |
124 | checkconfig || return 1 |
125 | ebegin "Restarting nagios" |
126 | svc_stop |
127 | svc_start |
128 | eend $? |
129 | } |
130 | |
131 | |
132 | |
133 | |
134 | -- |
135 | gentoo-commits@l.g.o mailing list |