File: network-manager-openvpn.postinst

package info (click to toggle)
network-manager-openvpn 1.10.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,464 kB
  • sloc: ansic: 13,687; sh: 5,051; makefile: 320; sed: 16; xml: 6
file content (18 lines) | stat: -rw-r--r-- 494 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

set -e

if [ "$1" = configure ]; then
    # create system user required to run the openvpn daemon unprivileged
    adduser --quiet --system \
            --home /var/lib/openvpn/chroot \
            --gecos "NetworkManager OpenVPN" \
            --group nm-openvpn

    # remove existing tmp directory to prevent nm-openvpn to run in a chroot
    if [ -d /var/lib/openvpn/chroot/tmp ]; then
        rmdir --ignore-fail-on-non-empty /var/lib/openvpn/chroot/tmp
    fi
fi

#DEBHELPER#