Use systemd rpm macros: bug #850374.
This commit is contained in:
parent
6ef183b5dd
commit
ccdfc5c47a
23
xrdp.spec
23
xrdp.spec
@ -112,27 +112,13 @@ touch %{buildroot}%{_sysconfdir}/xrdp/rsakeys.ini
|
||||
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
%systemd_post xrdp.service
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable xrdp.service > /dev/null 2>&1 || :
|
||||
/bin/systemctl stop xrdp.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
%systemd_preun xrdp.service
|
||||
|
||||
%postun
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
if [ "`/bin/systemctl is-active xrdp.service`" = 'active' ]; then
|
||||
/bin/systemctl stop xrdp.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl start xrdp.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
fi
|
||||
%systemd_postun_with_restart xrdp.service
|
||||
|
||||
%triggerun -- xrdp < 0.6.0-1
|
||||
/usr/bin/systemd-sysv-convert --save xrdp >/dev/null 2>&1 ||:
|
||||
@ -194,6 +180,9 @@ fi
|
||||
%attr(0600,root,root) %verify(not size md5 mtime) %{_sysconfdir}/xrdp/rsakeys.ini
|
||||
|
||||
%changelog
|
||||
* Mon Dec 8 2014 Bojan Smojver <bojan@rexursive.com> - 0.6.1-6
|
||||
- use systemd rpm macros: bug #850374
|
||||
|
||||
* Thu Aug 21 2014 Kevin Fenzi <kevin@scrye.com> - 0.6.1-5
|
||||
- Rebuild for rpm bug 1131960
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user