snappy services - auto restart
Alexander Sack
asac at canonical.com
Tue May 19 10:40:41 UTC 2015
On Fri, Apr 24, 2015 at 10:17 PM, Martin Pitt <martin.pitt at ubuntu.com> wrote:
> Hello Myles,
>
> Myles Caley [2015-04-20 12:05 -0400]:
>> Is there a way to configure services in snapps to auto-restart if the
>> process dies?
>
> In a systemd unit this is the "Restart=" option, see man
> systemd.service(5). In paticular, Restart=on-failure is the most
> popular option.
>
> However, TTBOMK this option isn't exposed in the snap's YAML, so this
> needs to be added there.
Shouldn't this be the default in almost all cases?
What other options exists for Restart= that might make sense?
>
>> Along the same lines, is there a way via snappy CLI to manually
>> restart a service if it does die?
>
> Sure, "sudo systemctl restart foo.service"; if you prefer, you can
> also use the init system agnostic and distro neutral "service"
> command, i. e. "sudo service foo restart".
>
> Along these lines, "systemctl --failed" is an useful command to list
> failed/crashed servies.
>
> Martin
>
> --
> Martin Pitt | http://www.piware.de
> Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
>
> --
> snappy-app-devel mailing list
> snappy-app-devel at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snappy-app-devel
More information about the snappy-app-devel
mailing list