snappy services - auto restart
Martin Pitt
martin.pitt at ubuntu.com
Fri Apr 24 20:25:39 UTC 2015
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.
> 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)
More information about the snappy-app-devel
mailing list