Skip to content

Commit

Permalink
Merge pull request #6651 from pieterlexis/backport-6641
Browse files Browse the repository at this point in the history
backport #6641: dnsdist: fix RPM scriptlets
  • Loading branch information
pieterlexis committed May 23, 2018
2 parents 02e81c1 + fd3f3ad commit 51c363b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions build-scripts/build-dnsdist-rpm
Expand Up @@ -158,11 +158,13 @@ exit 0
%post
%if 0%{?el6}
/sbin/chkconfig --add %{name}
%elif 0%{?suse_version}
%else
%if 0%{?suse_version}
%service_add_post %{name}.service
%else
%systemd_post %{name}.service
%endif
%endif
%preun
%if 0%{?el6}
Expand All @@ -171,22 +173,26 @@ if [ "\$1" -eq "0" ]; then
/sbin/service %{name} stop > /dev/null 2>&1 || :
/sbin/chkconfig --del %{name}
fi
%elif 0%{?suse_version}
%else
%if 0%{?suse_version}
%service_del_preun %{name}.service
%else
%systemd_preun %{name}.service
%endif
%endif
%postun
%if 0%{?el6}
if [ "\$1" -ge "1" ] ; then
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
%elif 0%{?suse_version}
%else
%if 0%{?suse_version}
%service_del_postun %{name}.service
%else
%systemd_postun_with_restart %{name}.service
%endif
%endif
%files
%{!?_licensedir:%global license %%doc}
Expand Down

0 comments on commit 51c363b

Please sign in to comment.