postinst is in crtmpserver-apps 1.0~dfsg-5.4build1.
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 | #! /bin/sh
set -e
APPLICATIONS="admin applestreamingclient appselector flvplayback proxypublish samplefactory stresstest vptests"
case "$1" in
configure)
# Copy application config if not exists
for app in $APPLICATIONS; do
if [ ! -f /etc/crtmpserver/applications/${app}.lua ]; then
cp /usr/share/crtmpserver-apps/${app}.lua \
/etc/crtmpserver/applications/${app}.lua
chmod 644 /etc/crtmpserver/applications/${app}.lua
fi
done
# copy users sample file if not exists
if [ ! -f /etc/crtmpserver/conf.d/users.lua ]; then
cp /usr/share/crtmpserver-apps/conf.d/users.lua \
/etc/crtmpserver/conf.d/users.lua
chmod 640 /etc/crtmpserver/conf.d/users.lua
fi
# Add all application as part of default install
if [ ! -f /etc/crtmpserver/enabled_applications.conf ]; then
cp /usr/share/crtmpserver-apps/enabled_applications.conf \
/etc/crtmpserver
chmod 644 /etc/crtmpserver/enabled_applications.conf
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
exit 0
;;
esac
|