Last active
March 29, 2020 11:51
-
-
Save fnx4/f26c8137f0af5aba1ebd18a65ced2b21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo find /etc/openvpn/ -name "*.conf" -type f -delete | |
for file in conf/*.ovpn; do | |
mv -f "$file" "$(basename "$file" .ovpn).conf" 2>/dev/null | |
done | |
sudo cp -r conf/* /etc/openvpn/ | |
sudo cp auth/login /etc/openvpn/ | |
sudo find /etc/openvpn -type f -exec sed -i 's/auth-user-pass/auth-user-pass login/g' {} \; | |
sudo rm -f /var/log/check-vpn-speeds.log | |
sudo touch /var/log/check-vpn-speeds.log | |
tail -f /var/log/check-vpn-speeds.log -n 0 | grep --line-buffered RESULT & | |
sudo ./check-vpn-speeds.sh > ./current-log.txt | |
sudo service openvpn stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment