postinst is in ejabberd-mod-rest 0.2016.01.12~dfsg0-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 | #!/bin/sh
set -e
# Automatically added by dh_moduleupdate
ejabberdctl="/usr/sbin/ejabberdctl"
mods="mod_rest"
if [ "$1" = "configure" ]; then
# check if ejabberd is running
$ejabberdctl status > /dev/null || exit 0
# source /etc/default/ejabberd
[ -f "/etc/default/ejabberd" ] && . /etc/default/ejabberd
for mod in $mods; do
if [ "$($ejabberdctl update_list | grep -c $mod)" -eq "1" ]; then
echo -n "Upgrading ejabberd module $mod... "
$ejabberdctl update $mod > /dev/null || { echo "failed"; continue; }
echo "ok"
else
echo "$mod is not enabled or has no update."
fi
done
fi
# End automatically added section
|