collector: survive bluetoothd hangs and restarts
- every BlueZ call runs off the asyncio thread with a timeout; if bluetoothd stays unresponsive for 30 s the collector restarts bluetooth.service and exits for a clean re-registration - Type=notify + WatchdogSec for buttontask-collector, never give up restarting - bluetooth.service drop-in: Restart=always (BlueZ 5.55 crashes on assert/SEGV), installed by device-install.sh and OTA (bt-update) - bt-service: bluez-restart action for the collector Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,10 @@ run_action() {
|
||||
collector-off)
|
||||
systemctl disable --now buttontask-collector
|
||||
;;
|
||||
bluez-restart)
|
||||
# Called by the collector when bluetoothd stops answering D-Bus.
|
||||
systemctl restart bluetooth
|
||||
;;
|
||||
units)
|
||||
systemctl list-units --type=service --all --no-legend --plain --no-pager \
|
||||
|| systemctl list-units --type=service --all --no-legend --no-pager
|
||||
@@ -60,7 +64,7 @@ run_action() {
|
||||
emit_journal
|
||||
;;
|
||||
*)
|
||||
echo "usage: bt-service {start|stop|restart|collector-on|collector-off|units|journal}" >&2
|
||||
echo "usage: bt-service {start|stop|restart|collector-on|collector-off|bluez-restart|units|journal}" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user