pull/20/head
233boy 7 years ago
parent 5878357a3e
commit b0f14a4026
  1. 25
      install.sh
  2. 4
      v2ray.sh

@ -775,6 +775,21 @@ install_v2ray() {
fi fi
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
if [[ $local_install ]]; then
if [[ ! -d $(pwd)/config ]]; then
echo
echo -e "$red 哎呀呀...安装失败了咯...$none"
echo
echo -e " 请确保你有完整的上传 233blog.com V2Ray 一键安装脚本 & 管理脚本到当前 ${green}$(pwd) $none目录下"
echo
exit 1
fi
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
[ -d /tmp/v2ray ] && rm -rf /tmp/v2ray [ -d /tmp/v2ray ] && rm -rf /tmp/v2ray
mkdir -p /tmp/v2ray mkdir -p /tmp/v2ray
@ -810,12 +825,6 @@ install_v2ray() {
rm -rf /tmp/v2ray rm -rf /tmp/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 [ $shadowsocks ]; then
if [[ $is_blocked_ad ]]; then if [[ $is_blocked_ad ]]; then
@ -1602,7 +1611,7 @@ get_qr_link() {
} }
install() { install() {
if [[ -f /usr/bin/v2ray/v2ray && -f /etc/v2ray/config.json ]] && [[ -f $backup && -f /lib/systemd/system/v2ray.service ]]; then if [[ -f /usr/bin/v2ray/v2ray && -f /etc/v2ray/config.json ]] && [[ -f $backup && -d /etc/v2ray/233boy/v2ray ]]; then
echo echo
echo " 大佬...你已经安装 V2Ray 啦...无需重新安装" echo " 大佬...你已经安装 V2Ray 啦...无需重新安装"
echo echo
@ -1625,7 +1634,7 @@ install() {
} }
uninstall() { uninstall() {
if [[ -f /usr/bin/v2ray/v2ray && -f /etc/v2ray/config.json ]] && [[ -f $backup ]]; then if [[ -f /usr/bin/v2ray/v2ray && -f /etc/v2ray/config.json ]] && [[ -f $backup && -d /etc/v2ray/233boy/v2ray ]]; then
while :; do while :; do
echo echo
read -p "$(echo -e "是否卸载 ${yellow}V2Ray$none [${magenta}Y/N$none]:")" uninstall_v2ray_ask read -p "$(echo -e "是否卸载 ${yellow}V2Ray$none [${magenta}Y/N$none]:")" uninstall_v2ray_ask

@ -10,7 +10,7 @@ none='\e[0m'
# Root # Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 [[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1
_version="v1.57" _version="v1.58"
cmd="apt-get" cmd="apt-get"
@ -44,7 +44,7 @@ fi
backup="/etc/v2ray/233blog_v2ray_backup.txt" backup="/etc/v2ray/233blog_v2ray_backup.txt"
if [[ -f /usr/bin/v2ray/v2ray && -f /etc/v2ray/config.json ]] && [[ -f $backup ]]; then if [[ -f /usr/bin/v2ray/v2ray && -f /etc/v2ray/config.json ]] && [[ -f $backup && -d /etc/v2ray/233boy/v2ray ]]; then
v2ray_transport=$(sed -n '17p' $backup) v2ray_transport=$(sed -n '17p' $backup)
v2ray_port=$(sed -n '19p' $backup) v2ray_port=$(sed -n '19p' $backup)

Loading…
Cancel
Save