mirror of
https://github.com/openziti/ziti.git
synced 2026-09-10 00:35:41 +00:00
require stop to succeed and verify it starts back up
This commit is contained in:
@@ -263,6 +263,11 @@ _rtr_svc_env_md5="$(md5sum /opt/openziti/etc/router/service.env | awk '{print $1
|
||||
# and the admin's original bootstrap answers in bootstrap.env are preserved.
|
||||
upgrade_local_debs "${TMPDIR}"
|
||||
|
||||
# postinstall must bring the services back itself; check before our own
|
||||
# explicit restarts below so a failed restart isn't masked.
|
||||
wait_for_service ziti-controller.service 30
|
||||
wait_for_service ziti-router.service 20
|
||||
|
||||
# ============================================================
|
||||
# Phase 5: Verify migration
|
||||
# ============================================================
|
||||
|
||||
@@ -23,6 +23,12 @@ upgrade() {
|
||||
# persistent account. Stop it first.
|
||||
if detectDynamicUserState && systemctl is-active --quiet "${SVC_USER}.service" 2>/dev/null; then
|
||||
systemctl stop "${SVC_USER}.service" || true
|
||||
# createUser + migration below assume the transient DynamicUser is gone;
|
||||
# if it's somehow still up, bail rather than migrate live state.
|
||||
if systemctl is-active --quiet "${SVC_USER}.service" 2>/dev/null; then
|
||||
echo "ERROR: could not stop ${SVC_USER}.service; aborting upgrade" >&2
|
||||
exit 1
|
||||
fi
|
||||
_MIGRATION_STOPPED_SERVICE=true
|
||||
fi
|
||||
createUser
|
||||
|
||||
@@ -23,6 +23,12 @@ upgrade() {
|
||||
# persistent account. Stop it first.
|
||||
if detectDynamicUserState && systemctl is-active --quiet "${SVC_USER}.service" 2>/dev/null; then
|
||||
systemctl stop "${SVC_USER}.service" || true
|
||||
# createUser + migration below assume the transient DynamicUser is gone;
|
||||
# if it's somehow still up, bail rather than migrate live state.
|
||||
if systemctl is-active --quiet "${SVC_USER}.service" 2>/dev/null; then
|
||||
echo "ERROR: could not stop ${SVC_USER}.service; aborting upgrade" >&2
|
||||
exit 1
|
||||
fi
|
||||
_MIGRATION_STOPPED_SERVICE=true
|
||||
fi
|
||||
createUser
|
||||
|
||||
Reference in New Issue
Block a user