Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- case "$1" in
- "start" | "wear" ) echo "Wear socks"
- launchctl load ~/Library/LaunchAgents/net.blinkingstar.homesocks.plist && launchctl start net.blinkingstar.homesocks
- sudo networksetup -setsocksfirewallproxy Ethernet localhost 1080
- sudo networksetup -setsocksfirewallproxystate Ethernet on ;;
- "stop" | "off" ) echo "Take off socks"
- launchctl unload ~/Library/LaunchAgents/net.blinkingstar.homesocks.plist
- sudo networksetup -setsocksfirewallproxystate Ethernet off
- sudo networksetup -setsocksfirewallproxystate Ethernet off ;;
- * ) echo "start or stop" ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement