summaryrefslogtreecommitdiff
path: root/public/fs/etc/openvpn/hostvpn-conf.sh
diff options
context:
space:
mode:
authorroot@culturestrings <root@culturestrings>2020-06-03 13:42:01 +0000
committerroot@culturestrings <root@culturestrings>2020-06-03 13:42:01 +0000
commit89dca39f896aec52d092a362266bd06d681c8d45 (patch)
tree94ea290d420ce5067e3f5d87400a65d97c5756eb /public/fs/etc/openvpn/hostvpn-conf.sh
parentc35fa9be301ecead49f40ad530be433e2e5ca7f4 (diff)
downloadculturestrings-89dca39f896aec52d092a362266bd06d681c8d45.tar.bz2
culturestrings-89dca39f896aec52d092a362266bd06d681c8d45.tar.xz
openvpn: make the configuration file site-agnostic.
Diffstat (limited to 'public/fs/etc/openvpn/hostvpn-conf.sh')
-rwxr-xr-xpublic/fs/etc/openvpn/hostvpn-conf.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/public/fs/etc/openvpn/hostvpn-conf.sh b/public/fs/etc/openvpn/hostvpn-conf.sh
new file mode 100755
index 0000000..1abfb1f
--- /dev/null
+++ b/public/fs/etc/openvpn/hostvpn-conf.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -eu
+
+source /root/config/private/config/server.ports
+source /root/config/private/config/hostname
+
+sed -e 's/@vpn_port@/'${vpn_port}'/g' \
+ -e 's/@hostname@/'${hostname}'/g' \
+ "$1"