Comment 2 for bug 1777121

Revision history for this message
Paweł Stołowski (stolowski) wrote :

Thanks for providing a use case with this bug report. We might think of a pre-remove hook, but this needs discussion (simply chaning current hook to run before services are stopped is of course not an option anymore).

As for interacting with services, you can do that with `snapctl start|stop|restart ..` (see "snapctl start --help" for an example), but I'm not suggesting to start the service back just to do the cleanup, just mentioning in case it's useful in some other case. We indeed may need a pre-remove hook to cater for all possible cases.