/[smecontribs]/rpms/smeserver-nagios/contribs8/smeserver-nagios-2.0.0-usermod.patch
ViewVC logotype

Diff of /rpms/smeserver-nagios/contribs8/smeserver-nagios-2.0.0-usermod.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by unnilennium, Sun Oct 13 23:07:23 2013 UTC Revision 1.3 by unnilennium, Mon Oct 14 00:02:11 2013 UTC
# Line 1  Line 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  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  --- 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  +++ 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 @@  @@ -1,6 +1,16 @@
5   #!/bin/sh   #!/bin/sh
6   /usr/sbin/usermod -G www nagios   /usr/sbin/usermod -G www nagios
7  -/usr/sbin/usermod -G nagios,nagiocmd www  -/usr/sbin/usermod -G nagios,nagiocmd www
 +listgroup=`groups www| sed 's/^.*: //g'|sed 's/ /,/g'`;  
8  +if [[ ! $listgroup == *nagios* ]]  +if [[ ! $listgroup == *nagios* ]]
9  +then  +then
10  +listgroup=$listgroup ",nagios,nagioscmd";  +listgroup=$listgroup",nagios";
11    +fi
12    +if [[ ! $listgroup == *nagiocm* ]]
13    +then
14    +listgroup=$listgroup",nagiocmd";
15  +fi  +fi
16  +/usr/sbin/usermod -G $listgroup www  +/usr/sbin/usermod -G $listgroup www
17    +/bin/mkdir -p /var/run/nagios
18    +/bin/chown nagios:nagios /var/run/nagios
19   /bin/mkdir -p /var/nagios/rw   /bin/mkdir -p /var/nagios/rw
20   /bin/chown -R nagios.www /var/nagios/rw   /bin/chown -R nagios.www /var/nagios/rw
21   /bin/chmod -R u+rwx,g+rws,o-rwx /var/nagios/rw   /bin/chmod -R u+rwx,g+rws,o-rwx /var/nagios/rw


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed