mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 10:08:15 -05:00
add systemd deploy script
This commit is contained in:
parent
dde47290d7
commit
666e98da85
@ -15,7 +15,7 @@ else
|
|||||||
echo "Please make sure unzip and daemon are installed."
|
echo "Please make sure unzip and daemon are installed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VER="v1.3"
|
VER="v1.4"
|
||||||
|
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
VDIS="64"
|
VDIS="64"
|
||||||
@ -59,14 +59,12 @@ if [ ! -f "/etc/v2ray/config.json" ]; then
|
|||||||
echo "UUID:${UUID}"
|
echo "UUID:${UUID}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#if [ -d "/lib/systemd/system" ]; then
|
if [ -d "/lib/systemd/system" ]; then
|
||||||
# if [ ! -f "/lib/systemd/system/v2ray.service" ]; then
|
if [ ! -f "/lib/systemd/system/v2ray.service" ]; then
|
||||||
# cp "/tmp/v2ray/v2ray-${VER}-linux-${VDIS}/systemd/v2ray.service" "/lib/systemd/system/"
|
cp "/tmp/v2ray/v2ray-${VER}-linux-${VDIS}/systemd/v2ray.service" "/lib/systemd/system/"
|
||||||
# systemctl enable v2ray
|
systemctl enable v2ray
|
||||||
# fi
|
fi
|
||||||
#el
|
elif [ -d "/etc/init.d" ]; then # Configure SysV if necessary.
|
||||||
|
|
||||||
if [ -d "/etc/init.d" ]; then # Configure SysV if necessary.
|
|
||||||
if [ ! -f "/etc/init.d/v2ray" ]; then
|
if [ ! -f "/etc/init.d/v2ray" ]; then
|
||||||
cp "/tmp/v2ray/v2ray-${VER}-linux-${VDIS}/systemv/v2ray" "/etc/init.d/v2ray"
|
cp "/tmp/v2ray/v2ray-${VER}-linux-${VDIS}/systemv/v2ray" "/etc/init.d/v2ray"
|
||||||
chmod +x "/etc/init.d/v2ray"
|
chmod +x "/etc/init.d/v2ray"
|
||||||
|
Loading…
Reference in New Issue
Block a user