1 |
unnilennium |
1.1 |
diff -up smeserver-nagios-2.0.0/root/etc/rc.d/init.d/nagios-sme.usermod 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.usermod 2008-11-17 06:49:09.000000000 -0500 |
3 |
|
|
+++ smeserver-nagios-2.0.0/root/etc/rc.d/init.d/nagios-sme 2013-10-13 18:49:52.000000000 -0400 |
4 |
|
|
@@ -1,6 +1,11 @@ |
5 |
|
|
#!/bin/sh |
6 |
|
|
/usr/sbin/usermod -G www nagios |
7 |
|
|
-/usr/sbin/usermod -G nagios,nagiocmd www |
8 |
|
|
+listgroup=`groups www| sed 's/^.*: //g'|sed 's/ /,/g'`; |
9 |
|
|
+if [[ ! $listgroup == *nagios* ]] |
10 |
|
|
+then |
11 |
|
|
+listgroup=$listgroup ",nagios,nagioscmd"; |
12 |
|
|
+fi |
13 |
|
|
+/usr/sbin/usermod -G $listgroup www |
14 |
|
|
/bin/mkdir -p /var/nagios/rw |
15 |
|
|
/bin/chown -R nagios.www /var/nagios/rw |
16 |
|
|
/bin/chmod -R u+rwx,g+rws,o-rwx /var/nagios/rw |