mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
Update install-release.sh
This commit is contained in:
parent
3c2b75f548
commit
891cba48ed
@ -20,6 +20,9 @@ CMD_INSTALL=""
|
|||||||
CMD_UPDATE=""
|
CMD_UPDATE=""
|
||||||
SOFTWARE_UPDATED=0
|
SOFTWARE_UPDATED=0
|
||||||
|
|
||||||
|
SYSTEMCTL_CMD=$(command -v systemctl 2>/dev/null)
|
||||||
|
SERVICE_CMD=$(command -v service 2>/dev/null)
|
||||||
|
|
||||||
CHECK=""
|
CHECK=""
|
||||||
FORCE=""
|
FORCE=""
|
||||||
HELP=""
|
HELP=""
|
||||||
@ -186,9 +189,6 @@ getVersion(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
stopV2ray(){
|
stopV2ray(){
|
||||||
SYSTEMCTL_CMD=$(command -v systemctl)
|
|
||||||
SERVICE_CMD=$(command -v service)
|
|
||||||
|
|
||||||
colorEcho ${BLUE} "Shutting down V2Ray service."
|
colorEcho ${BLUE} "Shutting down V2Ray service."
|
||||||
if [[ -n "${SYSTEMCTL_CMD}" ]] || [[ -f "/lib/systemd/system/v2ray.service" ]] || [[ -f "/etc/systemd/system/v2ray.service" ]]; then
|
if [[ -n "${SYSTEMCTL_CMD}" ]] || [[ -f "/lib/systemd/system/v2ray.service" ]] || [[ -f "/etc/systemd/system/v2ray.service" ]]; then
|
||||||
${SYSTEMCTL_CMD} stop v2ray
|
${SYSTEMCTL_CMD} stop v2ray
|
||||||
@ -203,9 +203,6 @@ stopV2ray(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
startV2ray(){
|
startV2ray(){
|
||||||
SYSTEMCTL_CMD=$(command -v systemctl)
|
|
||||||
SERVICE_CMD=$(command -v service)
|
|
||||||
|
|
||||||
if [ -n "${SYSTEMCTL_CMD}" ] && [ -f "/lib/systemd/system/v2ray.service" ]; then
|
if [ -n "${SYSTEMCTL_CMD}" ] && [ -f "/lib/systemd/system/v2ray.service" ]; then
|
||||||
${SYSTEMCTL_CMD} start v2ray
|
${SYSTEMCTL_CMD} start v2ray
|
||||||
elif [ -n "${SYSTEMCTL_CMD}" ] && [ -f "/etc/systemd/system/v2ray.service" ]; then
|
elif [ -n "${SYSTEMCTL_CMD}" ] && [ -f "/etc/systemd/system/v2ray.service" ]; then
|
||||||
@ -267,9 +264,6 @@ installV2Ray(){
|
|||||||
|
|
||||||
|
|
||||||
installInitScript(){
|
installInitScript(){
|
||||||
SYSTEMCTL_CMD=$(command -v systemctl)
|
|
||||||
SERVICE_CMD=$(command -v service)
|
|
||||||
|
|
||||||
if [[ -n "${SYSTEMCTL_CMD}" ]];then
|
if [[ -n "${SYSTEMCTL_CMD}" ]];then
|
||||||
if [[ ! -f "/etc/systemd/system/v2ray.service" ]]; then
|
if [[ ! -f "/etc/systemd/system/v2ray.service" ]]; then
|
||||||
if [[ ! -f "/lib/systemd/system/v2ray.service" ]]; then
|
if [[ ! -f "/lib/systemd/system/v2ray.service" ]]; then
|
||||||
@ -300,8 +294,6 @@ Help(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
remove(){
|
remove(){
|
||||||
SYSTEMCTL_CMD=$(command -v systemctl)
|
|
||||||
SERVICE_CMD=$(command -v service)
|
|
||||||
if [[ -n "${SYSTEMCTL_CMD}" ]] && [[ -f "/etc/systemd/system/v2ray.service" ]];then
|
if [[ -n "${SYSTEMCTL_CMD}" ]] && [[ -f "/etc/systemd/system/v2ray.service" ]];then
|
||||||
if pgrep "v2ray" > /dev/null ; then
|
if pgrep "v2ray" > /dev/null ; then
|
||||||
stopV2ray
|
stopV2ray
|
||||||
|
Loading…
Reference in New Issue
Block a user