hyperboria/rules/packaging/templates/prerm.jinja2
the-superpirate 8472f27ec5 No description
GitOrigin-RevId: ddf02e70d2827c048db49b687ebbcdcc67807ca6
2021-01-04 18:12:22 +03:00

31 lines
450 B
Django/Jinja

#!/usr/bin/env bash
set -e
case "$1" in
upgrade|deconfigure)
{% for line in services %}
service {{ line }} stop || true
{%- endfor %}
;;
remove)
{% for line in services %}
service {{ line }} stop || true
systemctl disable {{ line }} || true
{%- endfor %}
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0