From 0a40e8487cb9e1ce4c21fbd6ba84ea5044a0db45 Mon Sep 17 00:00:00 2001 From: maride Date: Wed, 22 Aug 2018 20:38:57 +0200 Subject: Generate config file and host it on a local port --- chainloader.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'chainloader.sh') diff --git a/chainloader.sh b/chainloader.sh index 15fee02..98558b2 100644 --- a/chainloader.sh +++ b/chainloader.sh @@ -1,17 +1,15 @@ #!/bin/sh -if [ "$action" == "generate" ]; then - # Generate PSK - openvpn --genkey --secret /prod/persist/static.key +# Generate PSK +openvpn --genkey --secret /prod/persist/static.key - # Generate client.conf - cat /prod/client.conf - echo "" - cat /prod/persist/static.key - echo "" -fi +# Generate client.conf +cat /prod/client.conf > /tmp/client.conf +echo "" >> /tmp/client.conf +cat /prod/persist/static.key >> /tmp/client.conf +echo "" >> /tmp/client.conf -if [ "$action" == "run" ]; then - openvpn --config /prod/server.conf -fi +./confhost & + +openvpn --config /prod/server.conf -- cgit 1.4.1