1 |
diff -up smeserver-nagios-2.0.0/root/etc/rc.d/init.d/nagios-sme.pnppath smeserver-nagios-2.0.0/root/etc/rc.d/init.d/nagios-sme |
2 |
--- smeserver-nagios-2.0.0/root/etc/rc.d/init.d/nagios-sme.pnppath 2013-10-15 22:07:52.000000000 -0400 |
3 |
+++ smeserver-nagios-2.0.0/root/etc/rc.d/init.d/nagios-sme 2013-10-15 22:22:18.000000000 -0400 |
4 |
@@ -1,5 +1,6 @@ |
5 |
#!/bin/sh |
6 |
/usr/sbin/usermod -G www nagios |
7 |
+listgroup=`groups www|sed 's/.*: //g'|sed 's/ /,/g'`; |
8 |
if [[ ! $listgroup == *nagios* ]] |
9 |
then |
10 |
listgroup=$listgroup",nagios"; |
11 |
@@ -14,4 +15,9 @@ fi |
12 |
/bin/mkdir -p /var/nagios/rw |
13 |
/bin/chown -R nagios.www /var/nagios/rw |
14 |
/bin/chmod -R u+rwx,g+rws,o-rwx /var/nagios/rw |
15 |
+# check pnp4nagios libexec |
16 |
+if [ -d /usr/libexec/pnp4nagios ] && [ ! -f /usr/libexec/nagios/process_perfdata.pl ] |
17 |
+then |
18 |
+/bin/ln -s /usr/libexec/pnp4nagios /usr/libexec/nagios |
19 |
+fi |
20 |
/etc/rc.d/init.d/nagios $1 |