|
@@ -46,8 +46,14 @@ if [ ! -f "/etc/v2ray/config.json" ]; then
|
|
|
echo "UUID:${UUID}"
|
|
echo "UUID:${UUID}"
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
-# Configure SysV if necessary.
|
|
|
|
|
-if [ -d "/etc/init.d" ]; then
|
|
|
|
|
|
|
+#if [ -d "/lib/systemd/system" ]; then
|
|
|
|
|
+# if [ ! -f "/lib/systemd/system/v2ray.service" ]; then
|
|
|
|
|
+# cp "/tmp/v2ray/v2ray-${VER}-linux-${VDIS}/systemd/v2ray.service" "/lib/systemd/system/"
|
|
|
|
|
+# systemctl enable v2ray
|
|
|
|
|
+# fi
|
|
|
|
|
+#el
|
|
|
|
|
+
|
|
|
|
|
+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"
|