Coder Social home page Coder Social logo

osx-wifi-location-changer's Introduction

#Mac OSX Wi-Fi Location Changer

  • Automatically changes the Mac OSX network location when Wi-Fi connection SSID changes
  • Allows having different IP settings depending on the Wi-Fi SSID

Based on http://tech.inhelsinki.nl/locationchanger/
Forked from https://github.com/rimar/wifi-location-changer/

Mountain Lion compatible

##Configuration

Edit locationchanger and change/add locations to be set:

# LOCATIONS 
Location_Automatic="Automatic"
Location_CompanyIntra="Company Intranet"

That's the exact names as they appear under "Location" in OSX's System Preferences -> Network

Edit locationchanger and add/edit SSIDS to be detected:

# SSIDS
SSID_TelekomPublic=Telekom
SSID_Home=PW
SSID_CompanyIntra=CompanyIntraSSID

Edit/Add SSID -> LOCATION mapping to list:

# SSID -> LOCATION mapping
case $SSID in
	$SSID_TelekomPublic ) LOCATION="$Location_Automatic";;
	$SSID_Home          ) LOCATION="$Location_Automatic";;
	$SSID_CompanyIntra  ) LOCATION="$Location_CompanyIntra";;
	# ... add more here

##Installation

Execute:

./install

... or do it manually:

Copy these files:

cp locationchanger /usr/local/bin
cp LocationChanger.plist ~/Library/LaunchAgents/

Should you place the locationchanger script to another location, make sure you edit the path in LocationChanger.plist too.

Make locationchanger script executable:

chmod +x /usr/local/bin/locationchanger

Load LocationChanger.plist as a launchd daemon:

launchctl load ~/Library/LaunchAgents/LocationChanger.plist

##Logfile

Logfile location can be adjusted in locationchanger:

exec &>/usr/local/var/log/locationchanger.log

See log in action:

tail -f /usr/local/var/log/locationchanger.log

osx-wifi-location-changer's People

Contributors

rimar avatar rocco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

osx-wifi-location-changer's Issues

mavericks

not sure why yet, but it seems to be broken on 10.9 . will send a pull request if i find the cause.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.