summaryrefslogtreecommitdiffstats
path: root/debian/postinst
blob: de913aed4e90e9da3cb51d02116a4a0218d4fd16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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#