postinst is in red5-server 1.0~svn4374-3.
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
# Author: Damien Raude-Morvan <drazzib@debian.org>.
set -e
DAEMONUSER=_red5
DAEMON=/usr/share/red5/red5.sh
case "$1" in
configure)
if ! id $DAEMONUSER > /dev/null 2>&1 ; then
adduser --system --force-badname --no-create-home \
--home /usr/share/red5 \
"$DAEMONUSER"
fi
chown -R $DAEMONUSER:nogroup /var/log/red5 /var/cache/red5
chown -R $DAEMONUSER:adm /etc/red5
chown $DAEMONUSER:adm /var/log/red5 /var/cache/red5
chmod -R 770 /etc/red5
chmod 750 /var/log/red5 /etc/red5
chmod 700 /var/cache/red5
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# Automatically added by dh_installinit
if [ -x "/etc/init.d/red5-server" ] || [ -e "/etc/init/red5-server.conf" ]; then
if [ ! -e "/etc/init/red5-server.conf" ]; then
update-rc.d red5-server defaults >/dev/null
fi
invoke-rc.d red5-server start || exit $?
fi
# End automatically added section
exit 0
|