diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-08-04 16:44:36 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-08-04 16:44:36 +0200 |
commit | f888fc8a5dc53491830353c83315a8fffd202d29 (patch) | |
tree | 88a85857b80bb6e98629da1a464624536a6bdda8 /debian/openvpn-generator | |
parent | e1243d3c551076d879f38a27c648fd9b8d76b354 (diff) |
d/openvpn-generator: Use service file from /etc/systemd/system if exists
Diffstat (limited to 'debian/openvpn-generator')
-rwxr-xr-x | debian/openvpn-generator | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/debian/openvpn-generator b/debian/openvpn-generator index d6ac1aa..b51344f 100755 --- a/debian/openvpn-generator +++ b/debian/openvpn-generator @@ -4,16 +4,27 @@ # tunnels listed in /etc/default/openvpn's AUTOSTART be started/stopped/reloaded # when openvpn.service is started/stopped/reloaded. +# +# Changelog: +# +# 2018-08-04 jff use service file from /etc/systemd/system if exists. +# + set -eu GENDIR="$1" WANTDIR="$1/openvpn.service.wants" SERVICEFILE="/lib/systemd/system/openvpn@.service" +SERVICEFILEMAN="/etc/systemd/system/openvpn@.service" AUTOSTART="all" CONFIG_DIR=/etc/openvpn mkdir -p "$WANTDIR" +if test -e ${SERVICEFILEMAN} ; then + SERVICEFILE=${SERVICEFILEMAN} +fi + if test -e /etc/default/openvpn ; then . /etc/default/openvpn fi |