MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _run_systemctl

Function _run_systemctl

webapp_modern.py:2484–2492  ·  view source on GitHub ↗

Execute systemctl with sudo and capture output.

(args: list[str], *, timeout: int = 60)

Source from the content-addressed store, hash-verified

2482 interval = 30
2483 for _ in range(interval // 5):
2484 if getattr(shared_data, 'webapp_should_exit', False):
2485 return
2486 if not shared_data.config.get('watchtower_enabled', False):
2487 break
2488 _time.sleep(5)
2489
2490
2491@app.route('/api/net/watchtower', methods=['GET'])
2492def watchtower_status():
2493 """Unified alert feed from the standalone watchers, for the Watchtower pane.
2494 Reflects config even before the monitor has run. `?limit=` and
2495 `?min_severity=` narrow the returned alert list."""

Callers 5

_collect_service_statusFunction · 0.85
_wait_for_service_activeFunction · 0.85
_stop_serviceFunction · 0.85
_dispatch_kiosk_changeFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected