Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
spec: Only add apache user to the icingacmd group if existing.
Browse files Browse the repository at this point in the history
Refs #5263
  • Loading branch information
Michael Friedrich authored and Michael Friedrich committed Jan 3, 2014
1 parent cd1d7a0 commit 2a1228c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Changelog
Expand Up @@ -34,6 +34,8 @@ FIXES

* initscript: handle binary return codes gracefully #5412 - MF

* spec: only add apache user to the icingacmd group if existing #5263 - MF

* contrib: remove legacy code #5406 - MF

CHANGES
Expand Down
9 changes: 8 additions & 1 deletion icinga.spec
Expand Up @@ -343,12 +343,19 @@ fi

%pre gui
# Add apacheuser in the icingacmd group
# If the group exists, add the apacheuser in the icingacmd group.
# It is not neccessary that icinga-cgi is installed on the same system as
# icinga 1.x and only on systems with icinga installed the icingacmd
# group exists.
getent group icingacmd > /dev/null

if [ $? -eq 0 ]; then
%if "%{_vendor}" == "suse"
%{_sbindir}/usermod -G icingacmd %{apacheuser}
%else
%{_sbindir}/usermod -a -G icingacmd %{apacheuser}
%endif

fi

%post idoutils-libdbi-mysql

Expand Down

0 comments on commit 2a1228c

Please sign in to comment.