Skip to content

Instantly share code, notes, and snippets.

@dev318
dev318 / makeLocationAndStaticIP.sh
Created September 20, 2013 15:14
Add a network location with manual IP info without switching to it, great for remote changes
#!/bin/bash
# purpose: add a network location with manual IP info without switching
# This script lets you fill in settings and apply them on en0(assuming that's active)
# but only interrupts current connectivity long enough to apply the settings,
# it then immediately switches back. (It also assumes a 'Static' location doesn't already exist...)
# Use at your own risk! No warranty granted or implied! Tell us we're doing it rong on twitter!
# author: Allister Banks, 318 Inc.
# set -x