Make xrdp-sesman.service stop when not needed by xrdp.service.

Also try to restart xrdp-sesman.service.
Just restarting xrdp.service not enough.
This commit is contained in:
Bojan Smojver 2012-05-26 08:53:12 +10:00
parent 7e41e2f666
commit 182f0e85f2
2 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,7 @@
[Unit]
Description=xrdp session manager
After=syslog.target network.target
StopWhenUnneeded=true
[Service]
Type=forking

View File

@ -1,7 +1,7 @@
Summary: Open source remote desktop protocol (RDP) server
Name: xrdp
Version: 0.6.0
Release: 0.2%{?dist}
Release: 0.3%{?dist}
License: GPLv2+ with exceptions
Group: Applications/Internet
URL: http://xrdp.sourceforge.net/
@ -118,6 +118,7 @@ fi
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart xrdp-sesman.service >/dev/null 2>&1 || :
/bin/systemctl try-restart xrdp.service >/dev/null 2>&1 || :
fi
@ -129,6 +130,7 @@ fi
# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del xrdp >/dev/null 2>&1 || :
/bin/systemctl try-restart xrdp-sesman.service >/dev/null 2>&1 || :
/bin/systemctl try-restart xrdp.service >/dev/null 2>&1 || :
@ -177,6 +179,10 @@ fi
%attr(0600,root,root) %verify(not size md5 mtime) %{_sysconfdir}/xrdp/rsakeys.ini
%changelog
* Sat May 26 2012 Bojan Smojver <bojan@rexursive.com> - 0.6.0-0.3
- also attempt to restart xrdp-sesman.service (just xrdp.service won't do it)
- stop xrdp-sesman.service when not needed by xrdp.service
* Fri May 25 2012 Bojan Smojver <bojan@rexursive.com> - 0.6.0-0.2
- bump release for rebuild with the correct e-mail address