Skip to content

Commit

Permalink
fix: incompatible CLI usage since v5
Browse files Browse the repository at this point in the history
fixes: v2fly#243
  • Loading branch information
digglife committed Sep 8, 2022
1 parent adf2229 commit 84c08e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions install-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ get_version() {
fi
# Determine the version number for V2Ray installed from a local file
if [[ -f '/usr/local/bin/v2ray' ]]; then
VERSION="$(/usr/local/bin/v2ray -version | awk 'NR==1 {print $2}')"
VERSION="$(/usr/local/bin/v2ray version | awk 'NR==1 {print $2}')"
CURRENT_VERSION="v${VERSION#v}"
if [[ "$LOCAL_INSTALL" -eq '1' ]]; then
RELEASE_VERSION="$CURRENT_VERSION"
Expand Down Expand Up @@ -378,7 +378,7 @@ install_startup_service_file() {
# Or all changes you made will be lost! # Refer: https://www.freedesktop.org/software/systemd/man/systemd.unit.html
[Service]
ExecStart=
ExecStart=/usr/local/bin/v2ray -confdir $JSONS_PATH" |
ExecStart=/usr/local/bin/v2ray run -confdir $JSONS_PATH" |
tee '/etc/systemd/system/v2ray.service.d/10-donot_touch_multi_conf.conf' > \
'/etc/systemd/system/[email protected]/10-donot_touch_multi_conf.conf'
else
Expand All @@ -388,13 +388,13 @@ ExecStart=/usr/local/bin/v2ray -confdir $JSONS_PATH" |
# Or all changes you made will be lost! # Refer: https://www.freedesktop.org/software/systemd/man/systemd.unit.html
[Service]
ExecStart=
ExecStart=/usr/local/bin/v2ray -config ${JSON_PATH}/config.json" > \
ExecStart=/usr/local/bin/v2ray run -config ${JSON_PATH}/config.json" > \
'/etc/systemd/system/v2ray.service.d/10-donot_touch_single_conf.conf'
echo "# In case you have a good reason to do so, duplicate this file in the same directory and make your customizes there.
# Or all changes you made will be lost! # Refer: https://www.freedesktop.org/software/systemd/man/systemd.unit.html
[Service]
ExecStart=
ExecStart=/usr/local/bin/v2ray -config ${JSON_PATH}/%i.json" > \
ExecStart=/usr/local/bin/v2ray run -config ${JSON_PATH}/%i.json" > \
'/etc/systemd/system/[email protected]/10-donot_touch_single_conf.conf'
fi
echo "info: Systemd service files have been installed successfully!"
Expand Down

0 comments on commit 84c08e2

Please sign in to comment.