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

Conflicts:
	Changelog
  • Loading branch information
Michael Friedrich authored and Michael Friedrich committed Jan 9, 2014
1 parent a8687bb commit 58cbf70
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion icinga.spec
Expand Up @@ -365,12 +365,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 58cbf70

Please sign in to comment.