1- To update the switch status, it should check both the socket and the service, if either one of them is both enabled and active, the switch should display as "on"
2- If the switch is turned off, both the socket and the service should be stopped and disabled
3- If the switch is turned on, the service should be stopped and disabled and the socket should be enabled and started.
So I think the patch should do the following:
1- To update the switch status, it should check both the socket and the service, if either one of them is both enabled and active, the switch should display as "on"
2- If the switch is turned off, both the socket and the service should be stopped and disabled
3- If the switch is turned on, the service should be stopped and disabled and the socket should be enabled and started.
For Jammy and lower, #3 should do the opposite.