add systemd support into xrdp

master
Itamar Reis Peixoto 13 years ago
parent 7fa4f936e4
commit a3d63eb5e0

@ -7,6 +7,14 @@ AM_INIT_AUTOMAKE([1.6 foreign])
AC_PROG_CC AC_PROG_CC
AC_C_CONST AC_C_CONST
AC_PROG_LIBTOOL 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], AC_ARG_ENABLE(nopam, AS_HELP_STRING([--enable-nopam],
[Build no PAM support (default: no)]), [Build no PAM support (default: no)]),
[nopam=true], [nopam=false]) [nopam=true], [nopam=false])

@ -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 = \ SUBDIRS = \
pam.d pam.d
if HAVE_SYSTEMD
systemdsystemunit_DATA = \
xrdp-sesman.service \
xrdp.service
endif
startscriptdir=$(sysconfdir)/xrdp startscriptdir=$(sysconfdir)/xrdp
startscript_DATA = \ startscript_DATA = \

@ -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

@ -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
Loading…
Cancel
Save