updated configs for Newshosting, scripted the update process

This commit is contained in:
Kristian Haugene
2016-10-10 22:44:17 +02:00
parent 62693bc13a
commit 56f92474e7
385 changed files with 14710 additions and 353 deletions

View File

@@ -0,0 +1,22 @@
#!/bin/bash
set -e
# If the script is called from elsewhere
cd "${0%/*}"
# Delete everything (not this script though)
find . ! -name '*.sh' -delete
# Get updated configuration zip
curl -kL https://www.newshosting.com/vpn/software/configs/nh_configs.zip -o openvpn.zip \
&& unzip -j openvpn.zip && rm openvpn.zip
# Ensure linux line endings
dos2unix *
# Update configs with correct paths
sed -i "s/auth-user-pass/auth-user-pass \/config\/openvpn-credentials.txt/" *.ovpn
# Create symlink for default.ovpn
ln -s lon-a01.ovpn default.ovpn