Browse Source

clients configs is not needed anymore

feature/refractoring
Paul Rock 7 years ago committed by Chocobozzz
parent
commit
6282d9ba8a
  1. 10
      scripts/install-openvpn.sh

10
scripts/install-openvpn.sh

@ -137,19 +137,9 @@ chmod +x "/etc/openvpn/scripts/"*
sed -i "s/USER=''/USER='$DB_USER'/" "/etc/openvpn/scripts/config.sh"
sed -i "s/PASS=''/PASS='$DB_PASS'/" "/etc/openvpn/scripts/config.sh"
cp -r "$base_path/installation/client-conf" "$base_path/../public"
# New workspace
cd "$base_path/../public"
# Replace in the client configurations with the ip of the server and openvpn protocol
for file in "./client-conf/gnu-linux/client.conf" "./client-conf/osx-viscosity/client.conf" "./client-conf/windows/client.ovpn"; do
sed -i "s/remote xxx\.xxx\.xxx\.xxx 443/remote $VPN_ADDR $VPN_PORT/" $file
if [ $VPN_PROTO = "udp" ]; then
sed -i "s/proto tcp-client/proto udp/" $file
fi
done
# Copy ta.key inside the client-conf directory
for directory in "./client-conf/gnu-linux/" "./client-conf/osx-viscosity/" "./client-conf/windows/"; do
cp "/etc/openvpn/"{ca.crt,ta.key} $directory

Loading…
Cancel
Save