Skip to content

Instantly share code, notes, and snippets.

View johlym's full-sized avatar

Johnathan Lyman johlym

View GitHub Profile
@stevenharman
stevenharman / restart-network-services
Created June 16, 2020 16:25
Restart Active Network Services on your Mac. You know, for the VPN!
#! /usr/bin/env bash
# shellcheck disable=SC2059
set -euo pipefail
# Toggle all currently 'Active' network servcies (e.g., Wi-Fi, Ethernet
# connections, etc...) to "restart" them. We'll ignore any already 'Disabled'
# services, and toggle all of the others to 'Disabled' and then back to
# 'Enabled'. This has been found helpful when your VPN won't re-connect after
# undocking and re-docking your MacBook, for example.