fix install mode parameter

pull/5/head
tzwjkl 2020-06-11 15:35:50 +08:00
parent 8699dd7db5
commit b92ed1985b
2 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,7 @@ download_geosite() {
rename_new() {
for DAT in 'geoip' 'geosite'; do
install "${V2RAY}$DAT.dat.new" "${V2RAY}$DAT.dat"
install -m 644 "${V2RAY}$DAT.dat.new" "${V2RAY}$DAT.dat"
rm "${V2RAY}$DAT.dat.new"
rm "${V2RAY}$DAT.dat.sha256sum.new"
done

View File

@ -330,7 +330,7 @@ install_file() {
if [[ "$NAME" == 'v2ray' ]] || [[ "$NAME" == 'v2ctl' ]]; then
install -m 755 "${TMP_DIRECTORY}$NAME" "/usr/local/bin/$NAME"
elif [[ "$NAME" == 'geoip.dat' ]] || [[ "$NAME" == 'geosite.dat' ]]; then
install "${TMP_DIRECTORY}$NAME" "/usr/local/lib/v2ray/$NAME"
install -m 644 "${TMP_DIRECTORY}$NAME" "/usr/local/lib/v2ray/$NAME"
fi
}
@ -376,8 +376,8 @@ install_startup_service_file() {
echo 'error: Failed to start service file download! Please check your network or try again.'
exit 1
fi
install "${TMP_DIRECTORY}systemd/system/v2ray.service" /etc/systemd/system/v2ray.service
install "${TMP_DIRECTORY}systemd/system/v2ray@.service" /etc/systemd/system/v2ray@.service
install -m 644 "${TMP_DIRECTORY}systemd/system/v2ray.service" /etc/systemd/system/v2ray.service
install -m 644 "${TMP_DIRECTORY}systemd/system/v2ray@.service" /etc/systemd/system/v2ray@.service
SYSTEMD='1'
fi
}