instfiles: substitute directories in systemd service files
Do not expect prefix is always /usr. /usr/local is often used when users compile xrdp manually.
This commit is contained in:
parent
67aab0a706
commit
bedf04cd9f
@ -1,9 +1,29 @@
|
||||
EXTRA_DIST = \
|
||||
keymap-names.txt \
|
||||
xrdp.sh \
|
||||
xrdp-sesman.service.in \
|
||||
xrdp.service.in
|
||||
|
||||
#
|
||||
# substitute directories in service file
|
||||
#
|
||||
CLEANFILES= \
|
||||
xrdp-sesman.service \
|
||||
xrdp.service
|
||||
|
||||
SUBST_VARS = sed \
|
||||
-e 's|@sbindir[@]|$(sbindir)|g' \
|
||||
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
|
||||
-e 's|@localstatedir[@]|$(localstatedir)|g'
|
||||
|
||||
subst_verbose = $(subst_verbose_@AM_V@)
|
||||
subst_verbose_ = $(subst_verbose_@AM_DEFAULT_V@)
|
||||
subst_verbose_0 = @echo " SUBST $@";
|
||||
|
||||
SUFFIXES = .in
|
||||
.in:
|
||||
$(subst_verbose)$(SUBST_VARS) $< > $@
|
||||
|
||||
#
|
||||
# files for all platforms
|
||||
#
|
||||
|
@ -1,17 +0,0 @@
|
||||
[Unit]
|
||||
Description=xrdp session manager
|
||||
Documentation=man:xrdp-sesman(8) man:sesman.ini(5)
|
||||
After=network.target
|
||||
StopWhenUnneeded=true
|
||||
BindsTo=xrdp.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/var/run/xrdp-sesman.pid
|
||||
EnvironmentFile=-/etc/sysconfig/xrdp
|
||||
EnvironmentFile=-/etc/default/xrdp
|
||||
ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS
|
||||
ExecStop=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS --kill
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
17
instfiles/xrdp-sesman.service.in
Normal file
17
instfiles/xrdp-sesman.service.in
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=xrdp session manager
|
||||
Documentation=man:xrdp-sesman(8) man:sesman.ini(5)
|
||||
After=network.target
|
||||
StopWhenUnneeded=true
|
||||
BindsTo=xrdp.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=@localstatedir@/run/xrdp-sesman.pid
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/xrdp
|
||||
EnvironmentFile=-@sysconfdir@/default/xrdp
|
||||
ExecStart=@sbindir@/xrdp-sesman $SESMAN_OPTIONS
|
||||
ExecStop=@sbindir@/xrdp-sesman $SESMAN_OPTIONS --kill
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,16 +0,0 @@
|
||||
[Unit]
|
||||
Description=xrdp daemon
|
||||
Documentation=man:xrdp(8) man:xrdp.ini(5)
|
||||
Requires=xrdp-sesman.service
|
||||
After=network.target xrdp-sesman.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/var/run/xrdp.pid
|
||||
EnvironmentFile=-/etc/sysconfig/xrdp
|
||||
EnvironmentFile=-/etc/default/xrdp
|
||||
ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS
|
||||
ExecStop=/usr/sbin/xrdp $XRDP_OPTIONS --kill
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
16
instfiles/xrdp.service.in
Normal file
16
instfiles/xrdp.service.in
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=xrdp daemon
|
||||
Documentation=man:xrdp(8) man:xrdp.ini(5)
|
||||
Requires=xrdp-sesman.service
|
||||
After=network.target xrdp-sesman.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=@localstatedir@/run/xrdp.pid
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/xrdp
|
||||
EnvironmentFile=-@sysconfdir@/default/xrdp
|
||||
ExecStart=@sbindir@/xrdp $XRDP_OPTIONS
|
||||
ExecStop=@sbindir@/xrdp $XRDP_OPTIONS --kill
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user