Bind xrdp-sesman.service to xrdp.service, so that restarts work.

Do not use forking style, but run services in the foreground instead.
Dispense with ExecStop, systemd will do that for us.
This commit is contained in:
Bojan Smojver 2012-05-28 10:02:26 +10:00
parent 98bd694da3
commit 49d439fe31
2 changed files with 3 additions and 8 deletions

View File

@ -2,13 +2,11 @@
Description=xrdp session manager Description=xrdp session manager
After=syslog.target network.target After=syslog.target network.target
StopWhenUnneeded=true StopWhenUnneeded=true
BindTo=xrdp.service
[Service] [Service]
Type=forking
PIDFile=/var/run/xrdp-sesman.pid
EnvironmentFile=/etc/sysconfig/xrdp EnvironmentFile=/etc/sysconfig/xrdp
ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS --nodaemon
ExecStop=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS --kill
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -4,11 +4,8 @@ Requires=xrdp-sesman.service
After=syslog.target network.target xrdp-sesman.service After=syslog.target network.target xrdp-sesman.service
[Service] [Service]
Type=forking
PIDFile=/var/run/xrdp.pid
EnvironmentFile=/etc/sysconfig/xrdp EnvironmentFile=/etc/sysconfig/xrdp
ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS --nodaemon
ExecStop=/usr/sbin/xrdp $XRDP_OPTIONS --kill
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target