Stop and/or start a snap from a command


#1

Is there an interface that would allow a command to stop and/or start a snap?

On classic confinement I can do snap stop ${SNAP_NAME} --disable. How can i do that under strict confinement?


#2

From within the snap, try snapctl instead of snap.


#3

Note this will only work for services within the same snap, one snap is not allowed to manage other snap’s services