debian: have a proper postinst script that reload (not restart, omg) nginx...

This commit is contained in:
Alexandre Aubin 2023-01-24 14:44:50 +01:00
parent 37bdfbae4d
commit beed8a5c7f

33
debian/postinst vendored
View file

@ -1,5 +1,34 @@
#!/bin/bash
yunohost app ssowatconf > /dev/null 2>&1
service nginx restart > /dev/null 2>&1
set -e
do_configure() {
systemctl reload nginx || true
}
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
do_configure
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0