Search
j0ke.net Open Build Service
>
Projects
>
home:netmax
:
playground
:
monitoring
>
nrpe3
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 6
[-]
[+]
Changed
nrpe.spec
@@ -184,6 +184,23 @@ %else %systemd_post nrpe.service %endif +if [ -d /etc/sudoers.d ] ; then + cat > /etc/sudoers.d/50_nagios << EOF +nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/,/usr/lib64/nagios/plugins/ +Defaults:nagios !requiretty +Defaults:nagios !env_keep +EOF +chmod 0440 /etc/sudoers.d/50_nagios + +elif [ -f /etc/sudoers ] ; then + if [ -z "`grep ^nagios /etc/sudoers`" ] ; then + echo "nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/,/usr/lib64/nagios/plugins/" >> /etc/sudoers + fi + if [ -z "`grep ^Defaults:nagios`" ] ; then + echo "Defaults:nagios !requiretty" >> /etc/sudoers + echo "Defaults:nagios !env_keep" >> /etc/sudoers + fi +fi %postun %if 0%{?el6}