postinst is in yate 5.4.0-1-1ubuntu2.
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 | #!/bin/sh
set -e
case "$1" in
configure)
if ! getent group yate > /dev/null ; then
echo 'Adding system-groupr for yate' 1>&2
addgroup --system yate
fi
if ! getent passwd yate > /dev/null ; then
adduser --system --ingroup yate --home /var/lib/yate \
--gecos "YATE daemon" --shell /bin/sh \
--disabled-password yate
adduser yate dialout
fi
mkdir -p /var/lib/yate /var/log/yate
chown -R yate:yate /var/lib/yate /var/log/yate
setcap cap_sys_nice=eip /usr/bin/yate
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 0
esac
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
if [ -x "/etc/init.d/yate" ]; then
update-rc.d yate defaults >/dev/null
fi
if [ -x "/etc/init.d/yate" ] || [ -e "/etc/init/yate.conf" ]; then
invoke-rc.d yate start || exit $?
fi
fi
# End automatically added section
|