Skip to content

Commit

Permalink
Update start_vpn.sh
Browse files Browse the repository at this point in the history
Move dns and cybersecure along with the pre-login settings
  • Loading branch information
Julio Gutierrez authored Aug 9, 2021
1 parent b606416 commit c138980
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions start_vpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,11 @@ restart_daemon() {
}
restart_daemon

echo "[$(date -Iseconds)] Pre settings $(nordvpn -version)"
[[ -n ${DNS} ]] && nordvpn set dns ${DNS//[;,]/ }
[[ -n ${CYBER_SEC} ]] && nordvpn set cybersec ${CYBER_SEC}
[[ -n ${OBFUSCATE} ]] && nordvpn set obfuscate ${OBFUSCATE}


[[ -z "${PASS}" ]] && [[ -f "${PASSFILE}" ]] && PASS="$(head -n 1 "${PASSFILE}")"

echo "[$(date -Iseconds)] Logging in"
Expand All @@ -159,9 +161,7 @@ nordvpn login --username "${USER}" --password "${PASS}" || {
exit 1
}

echo "[$(date -Iseconds)] Setting up $(nordvpn -version)"
[[ -n ${CYBER_SEC} ]] && nordvpn set cybersec ${CYBER_SEC}
[[ -n ${DNS} ]] && nordvpn set dns ${DNS//[;,]/ }
echo "[$(date -Iseconds)] Post settings $(nordvpn -version)"
[[ -n ${FIREWALL} ]] && nordvpn set firewall ${FIREWALL}
[[ -n ${KILLSWITCH} ]] && nordvpn set killswitch ${KILLSWITCH}
[[ -n ${PROTOCOL} ]] && nordvpn set protocol ${PROTOCOL}
Expand Down

0 comments on commit c138980

Please sign in to comment.