blob: 880fcfed89a8b3c2d443222c7fbd7e6f31382eaa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
# Generate PSK
openvpn --genkey --secret /prod/persist/static.key
# Generate client.conf
echo "remote $remoteAddress $remotePort" > /tmp/client.conf
echo "route $subnet $subnetMask" >> /tmp/client.conf
cat /prod/client.conf >> /tmp/client.conf
echo "<secret>" >> /tmp/client.conf
cat /prod/persist/static.key >> /tmp/client.conf
echo "</secret>" >> /tmp/client.conf
./confhost &
openvpn --config /prod/server.conf --script-security 2
|