Ticket 431 - Introduce new systemd-rpm macros in 389-ds-base spec file
Added the new systemd macros https://fedorahosted.org/389/ticket/431 Reviewed by: richm(Thanks!) (cherry picked from commit 81c22d34f83c294f67adbafd1af142bea0b13a69)
This commit is contained in:
parent
4283ccd41b
commit
3dfc57b1bc
@ -210,6 +210,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
output=/dev/null
|
output=/dev/null
|
||||||
|
%systemd_post %{pkgname}-snmp.service
|
||||||
# reload to pick up any changes to systemd files
|
# reload to pick up any changes to systemd files
|
||||||
/bin/systemctl daemon-reload >$output 2>&1 || :
|
/bin/systemctl daemon-reload >$output 2>&1 || :
|
||||||
# reload to pick up any shared lib changes
|
# reload to pick up any shared lib changes
|
||||||
@ -257,8 +258,7 @@ exit 0
|
|||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ]; then # Final removal
|
if [ $1 -eq 0 ]; then # Final removal
|
||||||
# Package removal, not upgrade
|
# Package removal, not upgrade
|
||||||
/bin/systemctl --no-reload disable %{pkgname}-snmp.service %{groupname} > /dev/null 2>&1 || :
|
%systemd_preun %{pkgname}-snmp.service %{groupname}
|
||||||
/bin/systemctl stop %{pkgname}-snmp.service %{groupname} > /dev/null 2>&1 || :
|
|
||||||
# remove instance specific service files/links
|
# remove instance specific service files/links
|
||||||
rm -rf %{_sysconfdir}/systemd/system/%{groupname}.wants/* > /dev/null 2>&1 || :
|
rm -rf %{_sysconfdir}/systemd/system/%{groupname}.wants/* > /dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user