- added new macros:

+ %icinga_user_group_add
  + %icinga_command_user_group_add
  to make it easier to have the same useradd/groupadd invocations
  in all packages

OBS-URL: https://build.opensuse.org/package/show/server:monitoring/nagios-rpm-macros?expand=0&rev=34
This commit is contained in:
Lars Vogdt 2013-08-07 20:56:58 +00:00 committed by Git OBS Bridge
parent f53b3a6a88
commit 4fb11fd27e
4 changed files with 31 additions and 1 deletions

View File

@ -80,3 +80,19 @@
%icinga_command_user wwwrun %icinga_command_user wwwrun
# Group, that can execute commands via %{icinga_command_file} # Group, that can execute commands via %{icinga_command_file}
%icinga_command_group icingacmd %icinga_command_group icingacmd
# Add Icinga user and groups
%icinga_user_group_add() \
/usr/sbin/groupadd -r %{icinga_group} 2>/dev/null || :\
/usr/sbin/useradd -r -g %{icinga_group} -d %{icinga_localstatedir} -s /bin/false -c "User for Icinga" %{icinga_user} 2>/dev/null || :\
%{nil}
%icinga_command_user_group_add() \
/usr/sbin/groupadd -r %{icinga_command_group} 2>/dev/null || :\
%if 0%{?suse_version} > 01220 \
/usr/sbin/usermod -a -G %{icinga_command_group} %{icinga_user} || :\
%else \
/usr/sbin/groupmod -A %{icinga_user} %{icinga_command_group} 2>/dev/null || :\
%endif \
%{nil}

View File

@ -25,6 +25,11 @@
# Nagios cgi directory # Nagios cgi directory
%nagios_cgidir %{_prefix}/lib/nagios/cgi %nagios_cgidir %{_prefix}/lib/nagios/cgi
#
# NRPE
#
%nrpe_sysconfdir %{_sysconfdir}/nrpe.d
# #
# files # files
# #

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Aug 7 20:56:02 UTC 2013 - lars@linux-schulserver.de
- added new macros:
+ %icinga_user_group_add
+ %icinga_command_user_group_add
to make it easier to have the same useradd/groupadd invocations
in all packages
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Apr 11 11:17:39 UTC 2013 - obs@botter.cc Thu Apr 11 11:17:39 UTC 2013 - obs@botter.cc

View File

@ -20,7 +20,7 @@ Name: nagios-rpm-macros
Summary: RPM Macros for Nagios based packages Summary: RPM Macros for Nagios based packages
License: BSD-3-Clause License: BSD-3-Clause
Group: System/Monitoring Group: System/Monitoring
Version: 0.06 Version: 0.07
Release: 0 Release: 0
Url: http://en.opensuse.org/Nagios Url: http://en.opensuse.org/Nagios
Source0: macros.nagios Source0: macros.nagios