fix: preserve updater across systemd restart
Signed Release / release (push) Successful in 10m18s

This commit is contained in:
Qiufeng
2026-08-04 22:31:20 +08:00
parent abba079dde
commit 670dfb0c7a
4 changed files with 34 additions and 21 deletions
+3
View File
@@ -435,6 +435,8 @@ start_service() {
fi
if [[ "$PLATFORM" == "linux" ]]; then
# The updater shares this service cgroup and must outlive the Java process
# to verify the restarted release and roll back a failed health check.
cat > /etc/systemd/system/kaidi-erp.service <<EOF
[Unit]
Description=Kaidi ERP
@@ -443,6 +445,7 @@ Wants=network-online.target
[Service]
Type=simple
KillMode=process
User=$ERP_USER
Group=$ERP_GROUP
Environment="ERP_INSTALL_ROOT=$INSTALL_ROOT"