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
|
%post
|
||||||
if [ $1 -eq 1 ] ; then
|
%systemd_post xrdp.service
|
||||||
# Initial installation
|
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ] ; then
|
%systemd_preun xrdp.service
|
||||||
# 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
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
%systemd_postun_with_restart xrdp.service
|
||||||
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
|
|
||||||
|
|
||||||
%triggerun -- xrdp < 0.6.0-1
|
%triggerun -- xrdp < 0.6.0-1
|
||||||
/usr/bin/systemd-sysv-convert --save xrdp >/dev/null 2>&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
|
%attr(0600,root,root) %verify(not size md5 mtime) %{_sysconfdir}/xrdp/rsakeys.ini
|
||||||
|
|
||||||
%changelog
|
%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
|
* Thu Aug 21 2014 Kevin Fenzi <kevin@scrye.com> - 0.6.1-5
|
||||||
- Rebuild for rpm bug 1131960
|
- Rebuild for rpm bug 1131960
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user