Comment 2 for bug 1803212

Revision history for this message
Ian Johnson (anonymouse67) wrote :

I think there are the following cases with my opinion on what should happen for every situation:

1. svc is disabled, and running

`snap start SNAP` doesn't matter
`snap restart SNAP` should not stop the service and not start the service
`snap stop SNAP` should stop the service

2. svc is disabled, and not running

`snap start SNAP` should not start the service
`snap restart SNAP` should not stop the service and not start the service
`snap stop SNAP` doesn't matter

3. svc is enabled, and running

`snap start SNAP` doesn't matter
`snap restart SNAP` should stop the service and then start the service
`snap stop SNAP` should stop the service

4. svc is enabled, and not running
`snap START SNAP` should start the service
`snap restart SNAP` should stop the service and then start the service
`snap stop SNAP` doesn't matter

My reasoning for why `snap stop` (and also `snap start`) should behave differently from `snap restart` is that I view `snap restart` as the same as a system reboot, i.e. if I were to reboot my system instead of running `snap restart` then my disabled services don't magically start running.

I think the state of "enabling"/"disabling" a service affects whether it is automatically started/stopped (i.e. not running `snap start SNAP.svc` or `snap stop SNAP.svc`)