More precise content

pull/86/head
Dct Mei 2020-04-11 22:02:32 +08:00
parent ccefbe7231
commit dd4eefbb9d
No known key found for this signature in database
GPG Key ID: 50BF8B712DCAD7EA
2 changed files with 22 additions and 2 deletions

View File

@ -1,5 +1,13 @@
# alpinelinux-install-v2ray
## 依賴軟體
### 安裝 cURL
```
# apk add curl
```
## 下載
```

View File

@ -49,6 +49,10 @@ done
unzip -q "$ZIP_FILE" -d "$TMP_DIRECTORY"
if [ -n "$(pgrep v2ray)" ]; then
rc-service v2ray stop
V2RAY_RUNNING='1'
fi
install -m 755 "${TMP_DIRECTORY}v2ray" "/usr/local/bin/v2ray"
install -m 755 "${TMP_DIRECTORY}v2ctl" "/usr/local/bin/v2ctl"
install -d /usr/local/lib/v2ray/
@ -76,8 +80,6 @@ if [ ! -f '/etc/init.d/v2ray' ]; then
OPENRC=yes
fi
rm -r "$TMP_DIRECTORY"
echo 'installed: /usr/local/bin/v2ray'
echo 'installed: /usr/local/bin/v2ctl'
echo 'installed: /usr/local/lib/v2ray/geoip.dat'
@ -100,3 +102,13 @@ fi
if [ -n "$OPENRC" ]; then
echo 'installed: /etc/init.d/v2ray'
fi
echo "You may need to execute a command to remove dependent software: apk del curl unzip"
if [ "$V2RAY_RUNNING" -eq '1' ]; then
rc-service v2ray start
else
echo 'Please execute the command: rcctl enable v2ray; rcctl start v2ray'
fi
rm -r "$TMP_DIRECTORY"
echo "removed: $TMP_DIRECTORY"
echo "info: V2Ray is installed."