File: postinst.sh

package info (click to toggle)
openvpn-auth-oauth2 1.27.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,212 kB
  • sloc: ansic: 172; makefile: 72; sh: 53; javascript: 10
file content (25 lines) | stat: -rwxr-xr-x 692 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

set -e

if ! command -v systemctl >/dev/null 2>&1; then
  exit 0
fi

if command -v apparmor_parser >/dev/null 2>&1 && command -v aa-enabled >/dev/null 2>&1; then
  if aa-enabled --quiet 2>/dev/null; then
    apparmor_parser --replace -T -W /etc/apparmor.d/usr.bin.openvpn-auth-oauth2 || true
  fi
fi

systemctl --system daemon-reload >/dev/null || true

if systemctl is-active --quiet openvpn-auth-oauth2; then
  systemctl restart openvpn-auth-oauth2 >/dev/null || true
fi

systemd-sysusers /usr/lib/sysusers.d/openvpn-auth-oauth2.conf >/dev/null || true

if [ -d /etc/openvpn-auth-oauth2 ]; then
  chown -R root:openvpn-auth-oauth2 /etc/openvpn-auth-oauth2/ >/dev/null || true
fi