Revert "rename snowflake systemd service"

This reverts commit 9702978d0c8a10d2597b707031b1a97627597718.
This commit is contained in:
KernelSailor 2025-12-29 18:18:02 +01:00
parent e22edd600a
commit 2e5376c4d6
2 changed files with 7 additions and 8 deletions

View File

@ -35,9 +35,8 @@ function update_script() {
RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//')
VERSION_FILE="/home/${SNOWFLAKEUSER}/.${APP}_version" VERSION_FILE="/home/${SNOWFLAKEUSER}/.${APP}_version"
if [[ ! -f "${VERSION_FILE}" ]] || [[ "${RELEASE}" != "$(cat "${VERSION_FILE}")" ]]; then if [[ ! -f "${VERSION_FILE}" ]] || [[ "${RELEASE}" != "$(cat "${VERSION_FILE}")" ]]; then
msg_info "Stopping ${APP} Service" systemctl stop snowflake-proxy
systemctl stop ${APP} msg_ok "Stopped Service"
msg_ok "Stopped ${APP} Service"
setup_go setup_go
@ -51,9 +50,9 @@ function update_script() {
echo "${RELEASE}" | sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tee .${APP}_version >/dev/null" echo "${RELEASE}" | sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tee .${APP}_version >/dev/null"
msg_ok "Updated ${APP} to v${RELEASE}" msg_ok "Updated ${APP} to v${RELEASE}"
msg_info "Starting ${APP} Service" msg_info "Starting Service"
systemctl start ${APP} systemctl start snowflake-proxy
msg_ok "Started ${APP} Service" msg_ok "Started Service"
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
else else
msg_ok "No update required. ${APP} is already at v${RELEASE}." msg_ok "No update required. ${APP} is already at v${RELEASE}."

View File

@ -33,7 +33,7 @@ echo "${RELEASE}" | sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tee .${APP}_ver
msg_ok "Built Snowflake Proxy v${RELEASE}" msg_ok "Built Snowflake Proxy v${RELEASE}"
msg_info "Creating Service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/${APP}.service cat <<EOF >/etc/systemd/system/snowflake-proxy.service
[Unit] [Unit]
Description=Snowflake Proxy Service Description=Snowflake Proxy Service
Documentation=https://snowflake.torproject.org/ Documentation=https://snowflake.torproject.org/
@ -52,7 +52,7 @@ RestartSec=10
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl enable -q --now ${APP} systemctl enable -q --now snowflake-proxy
msg_ok "Created Service" msg_ok "Created Service"
motd_ssh motd_ssh