Last active
December 4, 2018 09:12
-
-
Save legendtang/fe5e46590bda69bd363a1a40190b4ae6 to your computer and use it in GitHub Desktop.
Switch shadowsocks-libev nodes using brew services
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if test -f "/usr/local/etc/shadowsocks-libev-$1.json"; then | |
echo "/usr/local/etc/shadowsocks-libev-$1.json" | |
echo "Switch to $1 node" | |
cp /usr/local/etc/shadowsocks-libev.json /usr/local/etc/shadowsocks-libev.bak.json | |
cp "/usr/local/etc/shadowsocks-libev-$1.json" /usr/local/etc/shadowsocks-libev.json | |
brew services restart shadowsocks-libev | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment