diff options
author | maride <maride@darknebu.la> | 2018-08-22 13:53:25 +0200 |
---|---|---|
committer | maride <maride@darknebu.la> | 2018-08-22 13:53:25 +0200 |
commit | f8170053c19a9974d7a0f0e906c4832ee134d5c8 (patch) | |
tree | 94c8ac23816a99f89cff672040d7d3fe45d617ce /chainloader.sh |
Init: working setup
Diffstat (limited to 'chainloader.sh')
-rw-r--r-- | chainloader.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chainloader.sh b/chainloader.sh new file mode 100644 index 0000000..15fee02 --- /dev/null +++ b/chainloader.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +if [ "$action" == "generate" ]; then + # Generate PSK + openvpn --genkey --secret /prod/persist/static.key + + # Generate client.conf + cat /prod/client.conf + echo "<secret>" + cat /prod/persist/static.key + echo "</secret>" +fi + +if [ "$action" == "run" ]; then + openvpn --config /prod/server.conf +fi + |