File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,8 +183,10 @@ mv -f "$new" "$BIN" # atomic rename over the live path
183183log " swapped in $latest_tag (previous kept at $prev )"
184184
185185# --- Restart -------------------------------------------------------------
186+ # Runs as an unprivileged user (User=ubuntu); systemctl needs privilege, and
187+ # ubuntu has passwordless sudo on the box.
186188log " restarting $SERVICE "
187- systemctl restart " $SERVICE "
189+ sudo systemctl restart " $SERVICE "
188190
189191# --- HEALTH GATE ---------------------------------------------------------
190192# The listener only binds AFTER the ~4-5 min synchronous HNSW load, so a
209211err " new version $latest_tag did not become healthy within ${HEALTH_TIMEOUT_S} s — rolling back to $running "
210212if [[ -f " $prev " ]]; then
211213 mv -f " $prev " " $BIN "
212- systemctl restart " $SERVICE "
214+ sudo systemctl restart " $SERVICE "
213215 # Give the rolled-back process a chance to come back so the box isn't
214216 # left dark. Best-effort; we still exit non-zero to flag the failure.
215217 rb_deadline=$(( $(date +% s) + HEALTH_TIMEOUT_S ))
You can’t perform that action at this time.
0 commit comments