Skip to content

Commit

Permalink
Use permission verfication scripts on SUSE distributions
Browse files Browse the repository at this point in the history
refs #5818
  • Loading branch information
thardeck authored and gunnarbeutner committed Jul 30, 2014
1 parent c8db76a commit 074521b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion icinga2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ Meta package for Icinga 2 Core, DB IDO and Web.
Summary: Icinga 2 binaries and libraries
Group: Applications/System

%if "%{_vendor}" == "suse"
PreReq: permissions
%endif
BuildRequires: openssl-devel
BuildRequires: gcc-c++
BuildRequires: libstdc++-devel
Expand Down Expand Up @@ -301,6 +304,11 @@ getent group %{icingacmd_group} >/dev/null || %{_sbindir}/groupadd -r %{icingacm
getent passwd %{icinga_user} >/dev/null || %{_sbindir}/useradd -c "icinga" -s /sbin/nologin -r -d %{_localstatedir}/spool/%{name} -G %{icingacmd_group} -g %{icinga_group} %{icinga_user}
exit 0

%if "%{_vendor}" == "suse"
%verifyscript bin
%verify_permissions -e /var/run/icinga2/cmd
%endif


%if "%{_vendor}" == "suse"
%if 0%{?use_systemd}
Expand All @@ -314,7 +322,9 @@ exit 0
%post bin
# suse
%if 0%{?suse_version}

%if 0%{?suse_version} >= 1310
%set_permissions /var/run/icinga2/cmd
%endif
%if 0%{?use_systemd}
%fillup_only %{name}
%service_add_post %{name}.service
Expand Down

0 comments on commit 074521b

Please sign in to comment.