All Projects â†’ Jeff2Ma â†’ launchd-with-networkchange

Jeff2Ma / launchd-with-networkchange

Licence: MIT license
A tool with shell script and launchd to trigger actions whenever a Mac's network information is changed.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
applescript
352 projects

Projects that are alternatives of or similar to launchd-with-networkchange

Homebrew Services
🚀 Manage background services with macOS' launchctl daemon manager
Stars: ✭ 1,656 (+1327.59%)
Mutual labels:  launchd
XCMetricsAggregator
Automation tool for Xcode Metrics Organizer with AppleScript
Stars: ✭ 53 (-54.31%)
Mutual labels:  launchd
python-launchd
pythonic interface for launchd on OS X / macOS
Stars: ✭ 20 (-82.76%)
Mutual labels:  launchd

launchd with networkchange

A tool with shell script and launchd to trigger actions whenever a Mac's network information is changed.

[简体中文版使用说明] 请点击这里

Introduction

This repo is an easy way to deal with contexts like:

At workplace, your Mac Device has to make some settings such as change proxy address, set specical pac file, open some apps and so on. While at home your have change it again to others.

With the help of launchd, those operations can be automated. And that's what this repo do! It is fast, easy and safe.

Features

  • Easy to install and uninstall.

  • Password of your system account will be saved in keychain safely.

  • Add example so that your can easily change the code according to your conditions.

How to start

$ git clone https://github.com/Jeff2Ma/launchd-with-networkchange

$ cd launchd-with-networkchange

$ python install.py

Then input the info when is asked.

After that, please edit the code in example.sh according to your conditions.

When your Mac's network change, a notification will show when it run shell script with success.

Notices

  1. When the first run of the script, system will ask you like:

Remember to choose Always Allow.

2)you can make a example.sh copy one and rename it to dynamic.sh, it will be run instead of example.shsee how it work.

  1. If you want to uninstall it, you can run python install.py uninstall.

  2. Check /var/log/system.log if you are having issues with plist.

Contributing

Thanks to this Repo and this Alfred Workflow to provide inspiration for me.

Issues and Pull requests are warm welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].