Skip to content

Commit

Permalink
fix build files
Browse files Browse the repository at this point in the history
  • Loading branch information
DarienRaymond committed Oct 3, 2018
1 parent 2ca33e6 commit 6e26fb5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
11 changes: 8 additions & 3 deletions release/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ package(default_visibility=["//visibility:public"])

load("@v2ray_ext//bazel:build.bzl", "foreign_go_binary")
load("@v2ray_ext//bazel:zip.bzl", "pkg_zip")

package(default_visibility=["//visibility:public"])
load("@v2ray_ext//bazel:gpg.bzl", "gpg_sign")

foreign_go_binary(
name = "v2ray_linux_amd64",
Expand All @@ -30,14 +29,19 @@ filegroup(

filegroup(
name = "systemd",
srcs = ["config/systemd/v2ray.service", "config/systemv/v2ray"],
srcs = ["config/systemd_v2ray.service", "config/systemv_v2ray"],
)

filegroup(
name = "doc",
srcs = glob(["doc/*.md"]),
)

filegroup(
name = "geodata",
srcs = ["config/geoip.dat", "config/geosite.dat"],
)

pkg_zip(
name = "v2ray_linux_amd64_package",
srcs = [
Expand All @@ -48,6 +52,7 @@ pkg_zip(
":config_all",
":systemd",
":doc",
":geodata",
],
out = "v2ray-linux-64.zip",
)
File renamed without changes.
File renamed without changes.
10 changes: 8 additions & 2 deletions release/install-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,17 +269,23 @@ installV2Ray(){


installInitScript(){
if [[ -f "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemd/v2ray.service" ]]; then
cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemd/v2ray.service" "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemd_v2ray.service"
fi
if [[ -f "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemv/v2ray" ]]; then
cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemv/v2ray" "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemv_v2ray"
fi
if [[ -n "${SYSTEMCTL_CMD}" ]];then
if [[ ! -f "/etc/systemd/system/v2ray.service" ]]; then
if [[ ! -f "/lib/systemd/system/v2ray.service" ]]; then
cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemd/v2ray.service" "/etc/systemd/system/"
cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemd_v2ray.service" "/etc/systemd/system/"
systemctl enable v2ray.service
fi
fi
return
elif [[ -n "${SERVICE_CMD}" ]] && [[ ! -f "/etc/init.d/v2ray" ]]; then
installSoftware "daemon" || return $?
cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemv/v2ray" "/etc/init.d/v2ray"
cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemv_v2ray" "/etc/init.d/v2ray"
chmod +x "/etc/init.d/v2ray"
update-rc.d v2ray defaults
fi
Expand Down

0 comments on commit 6e26fb5

Please sign in to comment.