diff options
Diffstat (limited to 'public/fs/etc/openvpn')
-rwxr-xr-x | public/fs/etc/openvpn/hostvpn-conf.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/public/fs/etc/openvpn/hostvpn-conf.sh b/public/fs/etc/openvpn/hostvpn-conf.sh index 1abfb1f..cdfdb1c 100755 --- a/public/fs/etc/openvpn/hostvpn-conf.sh +++ b/public/fs/etc/openvpn/hostvpn-conf.sh @@ -2,9 +2,14 @@ set -eu +sitezone="$1" + +cfg_script="$0" +cfg_srcdir=$(cd -- "${cfg_script%/*}/" ; pwd -P) + source /root/config/private/config/server.ports -source /root/config/private/config/hostname +source /root/config/private/config/hostinfo/${sitezone} sed -e 's/@vpn_port@/'${vpn_port}'/g' \ -e 's/@hostname@/'${hostname}'/g' \ - "$1" + "${cfg_srcdir}/hostvpn.conf.in" |