Debian Codegraph @

packaging/scripts/postinst.sh

raw
1 #!/bin/sh
2
3 set -e
4
5 if ! command -v systemctl >/dev/null 2>&1; then
6 exit 0
7 fi
8
9 if command -v apparmor_parser >/dev/null 2>&1 && command -v aa-enabled >/dev/null 2>&1; then
10 if aa-enabled --quiet 2>/dev/null; then
11 apparmor_parser --replace -T -W /etc/apparmor.d/usr.bin.openvpn-auth-oauth2 || true
12 fi
13 fi
14
15 systemctl --system daemon-reload >/dev/null || true
16
17 if systemctl is-active --quiet openvpn-auth-oauth2; then
18 systemctl restart openvpn-auth-oauth2 >/dev/null || true
19 fi
20
21 systemd-sysusers /usr/lib/sysusers.d/openvpn-auth-oauth2.conf >/dev/null || true
22
23 if [ -d /etc/openvpn-auth-oauth2 ]; then
24 chown -R root:openvpn-auth-oauth2 /etc/openvpn-auth-oauth2/ >/dev/null || true
25 fi