From 49d439fe31913890d9ae164bc94851c129736879 Mon Sep 17 00:00:00 2001 From: Bojan Smojver Date: Mon, 28 May 2012 10:02:26 +1000 Subject: [PATCH] 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. --- xrdp-sesman.service | 6 ++---- xrdp.service | 5 +---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/xrdp-sesman.service b/xrdp-sesman.service index d40150c..79896e8 100644 --- a/xrdp-sesman.service +++ b/xrdp-sesman.service @@ -2,13 +2,11 @@ Description=xrdp session manager After=syslog.target network.target StopWhenUnneeded=true +BindTo=xrdp.service [Service] -Type=forking -PIDFile=/var/run/xrdp-sesman.pid EnvironmentFile=/etc/sysconfig/xrdp -ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS -ExecStop=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS --kill +ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS --nodaemon [Install] WantedBy=multi-user.target diff --git a/xrdp.service b/xrdp.service index 7bb076d..9cb3ede 100644 --- a/xrdp.service +++ b/xrdp.service @@ -4,11 +4,8 @@ Requires=xrdp-sesman.service After=syslog.target network.target xrdp-sesman.service [Service] -Type=forking -PIDFile=/var/run/xrdp.pid EnvironmentFile=/etc/sysconfig/xrdp -ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS -ExecStop=/usr/sbin/xrdp $XRDP_OPTIONS --kill +ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS --nodaemon [Install] WantedBy=multi-user.target