Debian Codegraph @

packaging/scripts/postremove.sh

raw
1 #!/bin/sh
2
3 set -e
4
5 case $1 in
6 1 | upgrade | failed-upgrade)
7 # RPM: If the first argument is 1, it means the package is being upgraded. https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
8 # DEB: If the first argument is upgrade or failed-upgrade, it means the package is being upgraded. https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#summary-of-ways-maintainer-scripts-are-called
9 ;;
10
11 *)
12 if id -g openvpn-auth-oauth2 >/dev/null 2>&1; then
13 groupdel openvpn-auth-oauth2 >/dev/null || true
14 fi
15
16 if ! command -v systemctl >/dev/null 2>&1; then
17 exit 0
18 fi
19
20 systemctl daemon-reload
21 systemctl reset-failed
22 ;;
23 esac