切换V2RAY的shell脚本
在以前的基础上精简了一下
#!/bin/sh
name=`basename $0 .sh`
function killv2()
{
pid=`ps -ef | grep v2ray | grep -v grep | awk '{print $2}'`
kill -n 9 ${pid}
}
case $1 in
us1|us2|us3|jp1|jp2|jp3|ru1|hk1)
echo "start ${1}..."
killv2
nohup ./v2ray --config=v2ray_$1.json >/dev/null 2>&1 &
;;
*)
echo "Usage: sudo $name.sh [us1|us2|us3|jp1|jp2|jp3|ru1|hk1]"
exit 1
;;
esac
exit 0