diff --git a/debian/postinst b/debian/postinst index c94f53c..541637e 100644 --- a/debian/postinst +++ b/debian/postinst @@ -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: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# 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