(log_line)
| 7007 | 'error': (proc.stderr or proc.stdout or 'systemctl restart failed').strip()}), 500 |
| 7008 | _, active = _sensing_unit_state() |
| 7009 | return jsonify({'success': True, 'active': active, |
| 7010 | 'message': 'Sensing service restarted' + ('' if active else ' (not active — check logs)')}) |
| 7011 | |
| 7012 | |
| 7013 | @app.route('/api/sensing/install-log', methods=['GET']) |
| 7014 | def sensing_install_log(): |
| 7015 | """Return the live install/uninstall log and current service state.""" |
| 7016 | log = '' |
| 7017 | try: |
| 7018 | with open(SENSING_INSTALL_LOG, 'r') as f: |
| 7019 | log = f.read()[-8000:] |
| 7020 | except FileNotFoundError: |
| 7021 | pass |
nothing calls this directly
no outgoing calls
no test coverage detected