Debian: add openvpn user/group if missing.

Signed-off-by: corbolais <corbolais@gmail.com>
This commit is contained in:
corbolais 2019-12-08 17:34:57 +01:00
parent 8affc9a313
commit 6e763e0240

View file

@ -1293,6 +1293,9 @@ set_var EASYRSA_KEY_SIZE ${pivpnENCRYPT}" | $SUDO tee vars >/dev/null
${SUDOE} ./easyrsa gen-crl
${SUDOE} cp pki/crl.pem /etc/openvpn/crl.pem
if test "${PLAT}" = "Debian"; then
if ! getent passwd openvpn; then
${SUDOE} adduser --system --home /etc/openvpn/ --no-create-home --group ${debianOvpnUserGroup%:*}
fi
${SUDOE} chown "$debianOvpnUserGroup" /etc/openvpn/crl.pem
else
${SUDOE} chown nobody:nogroup /etc/openvpn/crl.pem