summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2012-05-26 17:24:37 -0700
committerJay Sorg <jay.sorg@gmail.com>2012-05-26 17:24:37 -0700
commit5e72f90bba135d0bfa72346fde55b889ce4ea835 (patch)
treedf8193f1652b3ed1a7eb2b13208bad15c9e14919
parentbde5dd66713cec177846627bf026d8bcddbb41a8 (diff)
parenta8b5804268296d4efec1f3d20ee1c117352a3fb2 (diff)
downloadxrdp-proprietary-5e72f90bba135d0bfa72346fde55b889ce4ea835.tar.gz
xrdp-proprietary-5e72f90bba135d0bfa72346fde55b889ce4ea835.zip
Merge branch 'master' of github.com:FreeRDP/xrdp
-rw-r--r--configure.ac8
-rw-r--r--instfiles/Makefile.am10
-rw-r--r--instfiles/xrdp-sesman.service14
-rw-r--r--instfiles/xrdp.service14
4 files changed, 45 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 49070f58..9a1f9d69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,6 +7,14 @@ AM_INIT_AUTOMAKE([1.6 foreign])
AC_PROG_CC
AC_C_CONST
AC_PROG_LIBTOOL
+AC_ARG_WITH([systemdsystemunitdir],
+ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
+ [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+if test "x$with_systemdsystemunitdir" != xno; then
+ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+fi
+AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
+
AC_ARG_ENABLE(nopam, AS_HELP_STRING([--enable-nopam],
[Build no PAM support (default: no)]),
[nopam=true], [nopam=false])
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