add local install args

pull/82/head
233boy 7 years ago
parent 5ec9a9a9e6
commit dd2ea70690
  1. 35
      install.sh
  2. 2
      v2ray.sh

@ -695,7 +695,12 @@ install_v2ray() {
rm -rf /tmp/v2ray
git clone https://github.com/233boy/v2ray /etc/v2ray/233boy/v2ray
if [[ $local_install ]]; then
mkdir -p /etc/v2ray/233boy/v2ray
cp -rf $(pwd)/* /etc/v2ray/233boy/v2ray
else
git clone https://github.com/233boy/v2ray /etc/v2ray/233boy/v2ray
fi
if [ $shadowsocks ]; then
if [[ $is_blocked_ad ]]; then
@ -1660,6 +1665,30 @@ uninstall() {
fi
}
args=$1
[ -z $1 ] && args="online"
case $args in
online)
#hello world
;;
local)
local_install=true
;;
*)
echo
echo -e " 大佬...你输入的这个参数 <$red $args $none> ...这个是什么鬼啊...脚本不认识它哇"
echo
echo -e " 这个辣鸡脚本仅支持输入$green local / online $none参数"
echo
echo -e " 输入$yellow local $none即是使用本地安装"
echo
echo -e " 输入$yellow online $none即是使用在线安装 (默认)"
echo
exit 1
;;
esac
clear
while :; do
echo
@ -1673,6 +1702,10 @@ while :; do
echo
echo " 2. 卸载"
echo
if [[ $local_install ]]; then
echo " 温馨提示.. 本地安装已启用 .."
echo
fi
read -p "$(echo -e "请选择 [${magenta}1-2$none]:")" choose
case $choose in
1)

@ -10,7 +10,7 @@ none='\e[0m'
# Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1
_version="v1.32"
_version="v1.40"
cmd="apt-get"

Loading…
Cancel
Save