mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
confd: services: only enable/disable or touch on actual changes
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>
This commit is contained in:
@@ -57,7 +57,6 @@ fi
|
||||
|
||||
initctl -bq status lldpd && lldpcli configure system hostname "$new_hostname" 2>/dev/null
|
||||
initctl -bq touch mdns-alias 2>/dev/null
|
||||
initctl -bq touch netbrowse 2>/dev/null
|
||||
|
||||
# If called from dhcp script we need to reload to activate new name in syslogd
|
||||
# Otherwise we're called from confd, which does the reload when all is done.
|
||||
|
||||
Reference in New Issue
Block a user