use icinga2 also for user/group macros
OBS-URL: https://build.opensuse.org/package/show/server:monitoring/nagios-rpm-macros?expand=0&rev=39
This commit is contained in:
parent
b928704ba1
commit
73d2460e0c
@ -73,26 +73,26 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# User, Icinga runs under
|
# User, Icinga runs under
|
||||||
%icinga_user icinga
|
%icinga2_user icinga
|
||||||
# Group, Icinga runs under
|
# Group, Icinga runs under
|
||||||
%icinga_group icinga
|
%icinga2_group icinga
|
||||||
# User, that can execute commands via %{icinga_command_file}
|
# User, that can execute commands via %{icinga_command_file}
|
||||||
%icinga_command_user wwwrun
|
%icinga2_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
|
%icinga2_command_group icingacmd
|
||||||
|
|
||||||
# Add Icinga user and groups
|
# Add Icinga user and groups
|
||||||
%icinga_user_group_add() \
|
%icinga2_user_group_add() \
|
||||||
/usr/sbin/groupadd -r %{icinga_group} 2>/dev/null || :\
|
/usr/sbin/groupadd -r %{icinga2_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 || :\
|
/usr/sbin/useradd -r -g %{icinga2_group} -d %{icinga2_localstatedir} -s /bin/false -c "User for Icinga" %{icinga2_user} 2>/dev/null || :\
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
%icinga_command_user_group_add() \
|
%icinga2_command_user_group_add() \
|
||||||
/usr/sbin/groupadd -r %{icinga_command_group} 2>/dev/null || :\
|
/usr/sbin/groupadd -r %{icinga2_command_group} 2>/dev/null || :\
|
||||||
%if 0%{?suse_version} > 01220 \
|
%if 0%{?suse_version} > 01220 \
|
||||||
/usr/sbin/usermod -a -G %{icinga_command_group} %{icinga_user} || :\
|
/usr/sbin/usermod -a -G %{icinga2_command_group} %{icinga2_user} || :\
|
||||||
%else \
|
%else \
|
||||||
/usr/sbin/groupmod -A %{icinga_user} %{icinga_command_group} 2>/dev/null || :\
|
/usr/sbin/groupmod -A %{icinga2_user} %{icinga2_command_group} 2>/dev/null || :\
|
||||||
%endif \
|
%endif \
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user