v1.1.1 - watchdog daemonization fix (critical)
Critical fix
Previous v1.1.0 had two bugs that combined to allow a real-world leak after a reboot:
- post-fs-data ran before Android brought tether/AP interfaces up, so the interface scan returned an empty list and nothing got hooked into the FORWARD chain.
- service.sh watchdog was not properly daemonized —
( ... ) &left the background loop tied to Magisk's service-init PID context, where Android reaped it once the parent shell exited.
Combined effect: chain installed, but FORWARD had zero references to it. Hotspot traffic flowed straight through tetherctrl_FORWARD to the cellular interface.
What changed
- Proper daemonization:
setsid sh -c '...' </dev/null >/dev/null 2>&1 & ; disown— both post-fs-data retry loop and service.sh watchdog now run with PPID=1 (orphaned to init), so they survive Magisk session teardown. - post-fs-data runs a 90-second retry loop, hooking each interface as soon as it appears.
- Watchdog interval reduced from 30s to 10s.
- New:
ip monitor linkevent listener — re-asserts the chain immediately on any link UP event (zero-latency catch-up for late-boot or runtime tether toggles).