<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div>Ok, I jumped the gun on the hack, looks like the .service files for the snaps are auto-generated at startup. Is there a template I can modify somewhere for now?</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Myles Caley <<a href="mailto:myles@firstbuild.com">myles@firstbuild.com</a>><br><span style="font-weight:bold">Date: </span> Thursday, April 30, 2015 at 10:36 AM<br><span style="font-weight:bold">To: </span> Sergio Schvezov <<a href="mailto:sergio.schvezov@canonical.com">sergio.schvezov@canonical.com</a>>, Dustin Kirkland <<a href="mailto:kirkland@canonical.com">kirkland@canonical.com</a>><br><span style="font-weight:bold">Cc: </span> Steve Langasek <<a href="mailto:steve.langasek@canonical.com">steve.langasek@canonical.com</a>>, Snappy Dev List <<a href="mailto:snappy-app-devel@lists.ubuntu.com">snappy-app-devel@lists.ubuntu.com</a>><br><span style="font-weight:bold">Subject: </span> Re: snappy services - auto restart<br></div><div><br></div><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div>Thanks Sergio. Confirmed that restart is not enabled by default. I modified the .service file which is definitely a hack. For our needs, just having auto-restart by default when installing the snap package is fine. Having additional controls exposed through the snappy utils is not necessary for us if this is enabled.</div><div><br></div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Sergio Schvezov <<a href="mailto:sergio.schvezov@canonical.com">sergio.schvezov@canonical.com</a>><br><span style="font-weight:bold">Date: </span> Saturday, April 25, 2015 at 11:56 AM<br><span style="font-weight:bold">To: </span> Dustin Kirkland <<a href="mailto:kirkland@canonical.com">kirkland@canonical.com</a>><br><span style="font-weight:bold">Cc: </span> Myles Caley <<a href="mailto:myles@firstbuild.com">myles@firstbuild.com</a>>, Steve Langasek <<a href="mailto:steve.langasek@canonical.com">steve.langasek@canonical.com</a>>, Snappy Dev List <<a href="mailto:snappy-app-devel@lists.ubuntu.com">snappy-app-devel@lists.ubuntu.com</a>><br><span style="font-weight:bold">Subject: </span> Re: snappy services - auto restart<br></div><div><br></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 23, 2015 at 12:20 PM, Dustin Kirkland <span dir="ltr"><<a href="mailto:kirkland@canonical.com" target="_blank">kirkland@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On Mon, Apr 20, 2015 at 11:05 AM, Myles Caley <<a href="mailto:myles@firstbuild.com">myles@firstbuild.com</a>> wrote:<br>
> Is there a way to configure services in snapps to auto-restart if the<br>
> process dies? Along the same lines, is there a way via snappy CLI to<br>
> manually restart a service if it does die?<br><br></div></div>Hmm, that should be a systemd thing, I suspect.<br><br>
Sergio, et al, any ideas?<br></blockquote><div><br></div><div>From my point of view we should be autorestarting services, if that's not the case, I guess we want to fix that.</div><div><br></div><div>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:</div><div><br></div><div>Manage and check state:</div><div>sudo systemctl [start|stop|restart|status] [package_name]_[service_name]_[package_version].service</div><div><br></div><div>eg; webdm 0.6 has a service called avahi, so I would</div><div><br></div><div>sudo systemctl start webdm_avahi_0.6.service</div><div><br></div><div>Check logs</div><div>sudo journalctl -u [package_name]_[service_name]_[package_version].service<br></div><div><br></div><div>e.g.; to check the aforementioned service's logs:</div><div><br></div><div>sudo journalctl -u  webdm_avahi_0.6.service</div><div><br></div></div></div></div></span></div></div></span></body></html>