diff --git a/openvpn/adjustConfigs.sh b/openvpn/adjustConfigs.sh index 3c5a4a708..ca663cc2d 100755 --- a/openvpn/adjustConfigs.sh +++ b/openvpn/adjustConfigs.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash bold=$(tput bold) normal=$(tput sgr0) @@ -29,19 +29,18 @@ provider=$1 for configFile in $provider/*.ovpn; do - if [[ -h ${configFile} ]]; - then + if [[ -L ${configFile} ]]; then continue # Don't edit symbolic links (default.ovpn) fi # Absolute reference to ca cert - sed -i '' "s/ca .*\.crt/ca \/etc\/openvpn\/$provider\/ca.crt/g" "$configFile" + sed -i "s/ca .*\.crt/ca \/etc\/openvpn\/$provider\/ca.crt/g" "$configFile" # Absolute reference to crl - sed -i '' "s/crl-verify.*\.pem/crl-verify \/etc\/openvpn\/$provider\/crl.pem/g" "$configFile" + sed -i "s/crl-verify.*\.pem/crl-verify \/etc\/openvpn\/$provider\/crl.pem/g" "$configFile" # Set user-pass file location - sed -i '' "s/auth-user-pass.*/auth-user-pass \/config\/openvpn-credentials.txt/g" "$configFile" + sed -i "s/auth-user-pass.*/auth-user-pass \/config\/openvpn-credentials.txt/g" "$configFile" done