diff --git a/pikit_api/releases.py b/pikit_api/releases.py index 5bd9c6c..4d044d5 100644 --- a/pikit_api/releases.py +++ b/pikit_api/releases.py @@ -536,8 +536,9 @@ def _install_manifest(manifest: Dict[str, Any], meta: Optional[Dict[str, Any]], shutil.rmtree(API_PACKAGE_DIR, ignore_errors=True) shutil.copytree(staged_pkg, API_PACKAGE_DIR, dirs_exist_ok=True) - for svc in ("pikit-api.service", "dietpi-dashboard-frontend.service"): - subprocess.run(["systemctl", "restart", svc], check=False) + # Restart frontend to pick up new assets; avoid restarting this API process + # mid-apply to prevent leaving state in_progress. + subprocess.run(["systemctl", "restart", "dietpi-dashboard-frontend.service"], check=False) VERSION_FILE.parent.mkdir(parents=True, exist_ok=True) VERSION_FILE.write_text(str(latest))