postinst is in ola 0.9.8-1.
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 -e
# postinst script for ola
#create the olad user, add it to groups
getent passwd olad > /dev/null || adduser --system --home /usr/lib/olad --no-create-home olad
getent group olad > /dev/null || addgroup --system olad
groups olad | grep dialout > /dev/null || adduser olad dialout
groups olad | grep plugdev > /dev/null || adduser olad plugdev
# setup the config dir
chown -R olad:olad /etc/ola
chmod g+s /etc/ola
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
# Automatically added by dh_installinit
if [ -x "/etc/init.d/olad" ]; then
update-rc.d olad defaults >/dev/null
fi
if [ -x "/etc/init.d/olad" ] || [ -e "/etc/init/olad.conf" ]; then
invoke-rc.d olad start || exit $?
fi
# End automatically added section
# Automatically added by dh_installudev
if [ "$1" = configure ]; then
if [ -e "/etc/udev/rules.d/z60_ola.rules" ]; then
echo "Preserving user changes to /etc/udev/rules.d/40-ola.rules ..."
if [ -e "/etc/udev/rules.d/40-ola.rules" ]; then
mv -f "/etc/udev/rules.d/40-ola.rules" "/etc/udev/rules.d/40-ola.rules.dpkg-new"
fi
mv -f "/etc/udev/rules.d/z60_ola.rules" "/etc/udev/rules.d/40-ola.rules"
fi
fi
# End automatically added section
exit 0
|