mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 04:33:00 +02:00
Previously svc_enadis() would call 'initctl enable + touch' for every config change event, even when the service's enabled state was unchanged. This caused rousette to be unnecessarily restarted on every test_reset(), racing with the active RESTCONF connection on slow hardware. Replace svc_enadis() and svc_change() with svc_enable() which only manages nginx symlinks and calls 'initctl enable/disable' -- never touch. Each handler now checks the diff for the specific leaf that changed: - If /enabled appears in diff: call svc_enable() to start or stop it - If other config leaves changed with service already enabled: touch only This ensures rousette, ttyd, netbrowse, avahi, sshd, and lldpd are only restarted when their configuration actually requires it. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>