From a3d63eb5e01ceffc1e600031df2c63b7b91fdd0d Mon Sep 17 00:00:00 2001 From: Itamar Reis Peixoto Date: Sat, 26 May 2012 14:15:45 -0300 Subject: add systemd support into xrdp --- instfiles/Makefile.am | 10 +++++++++- instfiles/xrdp-sesman.service | 14 ++++++++++++++ instfiles/xrdp.service | 14 ++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 instfiles/xrdp-sesman.service create mode 100644 instfiles/xrdp.service (limited to 'instfiles') diff --git a/instfiles/Makefile.am b/instfiles/Makefile.am index d6d86140..4cabd942 100644 --- a/instfiles/Makefile.am +++ b/instfiles/Makefile.am @@ -1,8 +1,16 @@ -EXTRA_DIST = xrdp.sh km-0407.ini km-0409.ini km-040c.ini km-0410.ini km-0419.ini km-041d.ini +EXTRA_DIST = xrdp.sh km-0407.ini km-0409.ini km-040c.ini km-0410.ini km-0419.ini km-041d.ini \ +xrdp-sesman.service \ +xrdp.service SUBDIRS = \ pam.d +if HAVE_SYSTEMD +systemdsystemunit_DATA = \ + xrdp-sesman.service \ + xrdp.service +endif + startscriptdir=$(sysconfdir)/xrdp startscript_DATA = \ diff --git a/instfiles/xrdp-sesman.service b/instfiles/xrdp-sesman.service new file mode 100644 index 00000000..d40150cd --- /dev/null +++ b/instfiles/xrdp-sesman.service @@ -0,0 +1,14 @@ +[Unit] +Description=xrdp session manager +After=syslog.target network.target +StopWhenUnneeded=true + +[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 + +[Install] +WantedBy=multi-user.target diff --git a/instfiles/xrdp.service b/instfiles/xrdp.service new file mode 100644 index 00000000..7bb076d1 --- /dev/null +++ b/instfiles/xrdp.service @@ -0,0 +1,14 @@ +[Unit] +Description=xrdp daemon +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 + +[Install] +WantedBy=multi-user.target -- cgit v1.2.1