postinst is in rinputd 1.0.5-2.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #!/bin/sh
set -e
. /usr/share/debconf/confmodule
if [ "$1" = "configure" -o "$1" = "reconfigure" ]; then
if [ ! -e /etc/rinput/rinput.key -a ! -e /etc/rinput/rinput.crt ]; then
echo -n "Generating SSL key for rinputd... "
openssl genrsa -out /etc/rinput/rinput.key 1024 >/dev/null 2>&1
echo "Done"
chmod 600 /etc/rinput/rinput.key
echo -n "Generating SSL certificate for rinputd... "
echo "
`hostname`
" | openssl req -new -x509 -key /etc/rinput/rinput.key -out /etc/rinput/rinput.crt -days 1095 > /dev/null 2>&1
echo "Done"
fi
if [ "`echo $DEBIAN_FRONTEND | tr '[:upper:]' '[:lower:]'`" != "noninteractive" ]; then
db_get rinputd/username
USER="$RET"
db_get rinputd/passwd
PASS="$RET"
echo "$PASS" | saslpasswd2 -p -c -u rinput "$USER"
fi
fi
# Automatically added by dh_installinit
if [ -x "/etc/init.d/rinputd" ]; then
if [ ! -e "/etc/init/rinputd.conf" ]; then
update-rc.d rinputd defaults >/dev/null
fi
invoke-rc.d rinputd start || exit $?
fi
# End automatically added section
|