remove disable script protection

This commit is contained in:
2026-04-17 21:40:36 +02:00
parent d90c5e1650
commit ead2d5f217
3 changed files with 2 additions and 10 deletions

View File

@@ -926,8 +926,6 @@ def enable_script(name: str, req: EnableRequest) -> OperationResult:
except ValueError as e:
raise HTTPException(status_code=400, detail=str(e))
assert_not_example_script(name, "manually enabled")
script_path = script_path_for(name)
if not os.path.exists(script_path):
raise HTTPException(status_code=404, detail="script not found")
@@ -968,8 +966,6 @@ def disable_script(name: str, qnum: int) -> OperationResult:
validate_name(name)
except ValueError as e:
raise HTTPException(status_code=400, detail=str(e))
assert_not_example_script(name, "disabled")
service_name = make_service_name(name, qnum)
# attempt stop + remove via systemctl-based remove_unit
try:
@@ -1102,4 +1098,4 @@ def register_lifecycle(app) -> None:
remove_unit(svc)
except Exception:
logger.exception("Failed to remove unit %s on shutdown", svc)
logger.info("Shutdown cleanup complete")
logger.info("Shutdown cleanup complete")