Execute systemctl with sudo and capture output.
(args: list[str], *, timeout: int = 60)
| 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']) |
| 2492 | def 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.""" |
no test coverage detected