snappy services - auto restart
myles at firstbuild.com
Fri Apr 24 20:36:41 UTC 2015
Thanks Martinwas wondering (as you eluded) if there is something exposed
in the YAML/snappy CLI. I¹d prefer to have our configs/setups all bundled
in the yaml and possibly prompt a user before install asking for special
permissions (like a mobile phone would, SnappBlahBlahBlah would like to
access resource XYX). I might be thinking about this incorrectly, but one
thing I like about Snappy is the sandboxing. Almost like a mobile phone
w/out a hardwired UI.
On 4/24/15, 4:17 PM, "Martin Pitt" <martin.pitt at ubuntu.com> wrote:
>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
>However, TTBOMK this option isn't exposed in the snap's YAML, so this
>needs to be added there.
>> 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
>Martin Pitt | http://www.piware.de
>Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
More information about the snappy-app-devel