snappy services - auto restart

Sergio Schvezov sergio.schvezov at canonical.com
Sat Apr 25 15:56:30 UTC 2015


On Thu, Apr 23, 2015 at 12:20 PM, Dustin Kirkland <kirkland at canonical.com>
wrote:

> On Mon, Apr 20, 2015 at 11:05 AM, Myles Caley <myles at firstbuild.com>
> wrote:
> > Is there a way to configure services in snapps to auto-restart if the
> > process dies? Along the same lines, is there a way via snappy CLI to
> > manually restart a service if it does die?
>
> Hmm, that should be a systemd thing, I suspect.
>
> Sergio, et al, any ideas?
>

>From my point of view we should be autorestarting services, if that's not
the case, I guess we want to fix that.

For the latter, we don't have a snappy interface to restart services (we
could expose one, not sure about the granularity though), for now here's a
cheatsheet:

Manage and check state:
sudo systemctl [start|stop|restart|status]
[package_name]_[service_name]_[package_version].service

eg; webdm 0.6 has a service called avahi, so I would

sudo systemctl start webdm_avahi_0.6.service

Check logs
sudo journalctl -u [package_name]_[service_name]_[package_version].service

e.g.; to check the aforementioned service's logs:

sudo journalctl -u  webdm_avahi_0.6.service
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20150425/89c1b48f/attachment.html>


More information about the snappy-app-devel mailing list