diff --git a/instfiles/Makefile.am b/instfiles/Makefile.am index 85b5ffaa..dd11c7a0 100644 --- a/instfiles/Makefile.am +++ b/instfiles/Makefile.am @@ -4,7 +4,6 @@ xrdp.service SUBDIRS = \ pam.d \ - init.d \ default \ pulse @@ -12,6 +11,9 @@ if HAVE_SYSTEMD systemdsystemunit_DATA = \ xrdp-sesman.service \ xrdp.service +else +SUBDIRS+= + init.d endif startscriptdir=$(sysconfdir)/xrdp @@ -34,5 +36,7 @@ startscript_DATA = \ # must be tab below install-data-hook: chmod 755 $(DESTDIR)$(sysconfdir)/xrdp/xrdp.sh - chmod 755 $(DESTDIR)$(sysconfdir)/init.d/xrdp - sed -i 's|__BASE__|$(prefix)|' $(DESTDIR)$(sysconfdir)/init.d/xrdp; + if [ -f $(DESTDIR)$(sysconfdir)/init.d/xrdp ]; then \ + chmod 755 $(DESTDIR)$(sysconfdir)/init.d/xrdp; \ + sed -i 's|__BASE__|$(prefix)|' $(DESTDIR)$(sysconfdir)/init.d/xrdp; \ + fi diff --git a/instfiles/init.d/Makefile.am b/instfiles/init.d/Makefile.am index ae411c20..d9e43ecb 100644 --- a/instfiles/init.d/Makefile.am +++ b/instfiles/init.d/Makefile.am @@ -1,4 +1,4 @@ EXTRA_DIST = xrdp startscriptdir=$(sysconfdir)/init.d startscript_DATA = xrdp - +