#!/bin/sh cleanup() { echo "Ctrl+C pressed. Disconnecting VPN..." sudo killswitch -d exit 0 } trap cleanup INT echo "Connecting VPN..." (sleep 10; sudo killswitch -e) & sudo openvpn /Users/slococo/Documents/client.ovpn exit 1