diff --git a/install-release.sh b/install-release.sh index 739d12d..d4c34ab 100755 --- a/install-release.sh +++ b/install-release.sh @@ -495,6 +495,7 @@ install_xray() { if [[ -z "$JSONS_PATH" ]] && [[ ! -d "$JSON_PATH" ]]; then install -d "$JSON_PATH" echo "{}" >"${JSON_PATH}/config.json" + chown "$INSTALL_USER_UID:$INSTALL_USER_GID" "${JSON_PATH}/config.json" CONFIG_NEW='1' fi @@ -526,14 +527,6 @@ install_xray() { install_startup_service_file() { mkdir -p '/etc/systemd/system/xray.service.d' mkdir -p '/etc/systemd/system/xray@.service.d/' - local temp_CapabilityBoundingSet="CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE" - local temp_AmbientCapabilities="AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE" - local temp_NoNewPrivileges="NoNewPrivileges=true" - if [[ "$INSTALL_USER_UID" -eq '0' ]]; then - temp_CapabilityBoundingSet="#${temp_CapabilityBoundingSet}" - temp_AmbientCapabilities="#${temp_AmbientCapabilities}" - temp_NoNewPrivileges="#${temp_NoNewPrivileges}" - fi cat >/etc/systemd/system/xray.service <