takama / daemon

A daemon package for use with Go (golang) services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to change Restart property on Linux systemd

sidepelican opened this issue · comments

I am using this on Raspbian.
While running on systemd installed by this, when my program raised Panic, that was not restarted.

I found this line on daemon_linux_systemd.go

Restart=on-abort

this property restarts only the program exited with unclean-signal.
(from https://www.freedesktop.org/software/systemd/man/systemd.service.html , Table1)
I want to try on-failure property.

How to set the value?

Hi,
thank you for your feedback. There are not possible to set this parameter in this implementation.
Which options are present:

  1. You can fork this project and set this parameter in your fork as permanent.
  2. We can accept your PR as reasonable for systemD.

thank you for your reply.
I choose second option. Please review.

thank you
accepted