GithubHelp home page GithubHelp logo

michalliu / launchd-with-networkchange Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeff2ma/launchd-with-networkchange

0.0 1.0 0.0 149 KB

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

License: MIT License

AppleScript 9.09% Shell 36.73% Python 54.18%

launchd-with-networkchange's Introduction

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

Issues and Pull requests are welcome.

launchd-with-networkchange's People

Contributors

jeff2ma avatar michalliu avatar

Watchers

 avatar

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.