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
+8
View File
@@ -593,6 +593,13 @@ test_systemd_unit_uses_compatible_protection() (
! grep -Fq 'ProtectSystem=strict' "$PROJECT_ROOT/install.sh"
)
test_systemd_unit_preserves_update_helper_during_restart() (
local unit
unit="$(sed -n '/^ cat > \/etc\/systemd\/system\/kaidi-erp.service/,/^ systemctl daemon-reload/p' "$PROJECT_ROOT/install.sh")"
grep -Fqx 'KillMode=process' <<< "$unit"
! grep -Fq 'KillMode=control-group' <<< "$unit"
)
test_systemd_unit_uses_unquoted_legacy_paths() (
local unit
unit="$(sed -n '/^ cat > \/etc\/systemd\/system\/kaidi-erp.service/,/^ systemctl daemon-reload/p' "$PROJECT_ROOT/install.sh")"
@@ -771,6 +778,7 @@ run_test 'installer moves database setup to the web wizard' test_installer_moves
run_test 'installer requires an explicit Gitea URL' test_installer_requires_explicit_gitea_url
run_test 'Linux production install requires systemd' test_linux_service_preflight_requires_systemd
run_test 'systemd unit uses compatible protection' test_systemd_unit_uses_compatible_protection
run_test 'systemd unit preserves update helper during restart' test_systemd_unit_preserves_update_helper_during_restart
run_test 'systemd unit uses unquoted legacy paths' test_systemd_unit_uses_unquoted_legacy_paths
run_test 'uninstaller purges database before removing files' test_uninstaller_purges_database_before_removing_files
run_test 'uninstaller rejects unsafe paths' test_uninstaller_rejects_unsafe_paths