File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 33set -e
44
55# If the script is called from elsewhere
6- cd " $( dirname " $0 " ) "
6+ cd " ${0 %/* } "
77
88# Delete everything (not this script though)
99find . ! -name ' *.sh' -delete
@@ -13,14 +13,16 @@ curl -L https://privado.io/apps/ovpn_configs.zip -o privado_configs.zip &&
1313 unzip -j privado_configs.zip && rm -f privado_configs.zip
1414
1515# Delete "tcp-scramble" files
16- rm -f * .tcp-scramble.ovpn
16+ rm -f ./ * .tcp-scramble.ovpn
1717
18- # Strip out ".default" from filenames
19- for f in * .default.ovpn; do mv -- " $f " " ${f% .default.ovpn} .ovpn" ; done
20-
21- # Update configs with correct paths
22- sed -i " s/auth-user-pass/auth-user-pass \/config\/openvpn-credentials.txt/" * .ovpn
18+ for f in * .default.ovpn; do
19+ fn=" ${f% .default.ovpn} .ovpn"
20+ # Strip out ".default" from filenames
21+ mv -- " $f " " $fn "
22+ # Update configs with correct paths
23+ sed -i " s/auth-user-pass/auth-user-pass \/config\/openvpn-credentials.txt/" " $fn "
24+ done
2325
2426# Create symlink for default.ovpn using the first ams-XXX.ovpn file
2527files=(ams-* .ovpn)
26- ln -sf " ${files[1]} " default.ovpn
28+ ln -sf " ${files[1]} " default.ovpn
You can’t perform that action at this time.
0 commit comments