summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--postinstall-pak24
1 files changed, 24 insertions, 0 deletions
diff --git a/postinstall-pak b/postinstall-pak
new file mode 100644
index 00000000..de913aed
--- /dev/null
+++ b/postinstall-pak
@@ -0,0 +1,24 @@
+#!/bin/sh -e
+
+if ! ([ "$1" = "configure" ] || [ "$1" = "reconfigure" ]); then
+ exit 0
+fi
+
+
+XRDP="xrdp"
+ADDUSER="/usr/sbin/adduser"
+XRDPLOG="/var/log/xrdp-sesman.log"
+SESMANLOG="/var/log/xrdp-sesman.log"
+RSAKEYS="/etc/xrdp/rsakeys.ini"
+
+[ -d /var/run/xrdp ] || mkdir -p /var/run/xrdp
+$ADDUSER --system --disabled-password --disabled-login --home /var/run/xrdp \
+ --no-create-home --quiet --group $XRDP
+
+touch $SESMANLOG $XRDPLOG
+chown $XRDP:$XRDP $SESMANLOG
+chown $XRDP:$XRDP $XRDPLOG
+chgrp $XRDP $RSAKEYS
+chmod g+r $RSAKEYS
+
+#DEBHELPER#