Simple daemon settings

Roberto Mier Escandón  roberto.escandon at canonical.com
Thu Mar 16 09:00:39 UTC 2017


You can find all the restart conditions here [1]

Basically it says:

# Condition to restart the daemon under. Defaults to on-failure.
# See the systemd.service manual on Restart for details.
restart-condition: \
 on-failure | on-success | on-abnormal | on-abort | always | never

Cheers.

[1] https://snapcraft.io/docs/snaps/metadata

On 16/03/17 09:41, Ara Pulido wrote:
> On Thu, Mar 16, 2017 at 9:32 AM, Sergey Borovkov <serge.borovkov at gmail.com>
> wrote:
> 
>> Hello,
>> I am running service using daemon: simple in snapcraft. Is there any way
>> to configure how systemd handles restarting in the snapcraft.yaml? Current
>> behavior is that it restarts the service when it exits with non zero exit
>> code. But it does not get restarted otherwise. Can this be tweaked?
>>
> 
> I believe you can add:
> 
> daemon: simple
> restart-condition: always
> 
> Regards,
> Ara.
> 

-- 
--
. Roberto Mier Escandón.
. Software Engineer
.
. Canonical - Solutions Engineering
--




More information about the Snapcraft mailing list