diff options
author | oberix@c7a19cddb1663df0c612a979b9d13b0d67f1f69a <oberix@web> | 2017-03-30 10:43:19 +0000 |
---|---|---|
committer | admin <admin@branchable.com> | 2017-03-30 10:43:19 +0000 |
commit | 8a104e905c206164d9fa01685a632a1496cc8026 (patch) | |
tree | 84733bdd7e1bcc072832476e18bfaa965ceb61c8 /doc/tips | |
parent | 3503ea801587cdd16bbd06f5f96321f5ce3199f4 (diff) |
Added a comment: autostart and foreground together doesn't seem to work
Diffstat (limited to 'doc/tips')
-rw-r--r-- | doc/tips/Systemd_unit/comment_1_06399a293f08401032bef1b94f05547c._comment | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/tips/Systemd_unit/comment_1_06399a293f08401032bef1b94f05547c._comment b/doc/tips/Systemd_unit/comment_1_06399a293f08401032bef1b94f05547c._comment new file mode 100644 index 000000000..7af170ef1 --- /dev/null +++ b/doc/tips/Systemd_unit/comment_1_06399a293f08401032bef1b94f05547c._comment @@ -0,0 +1,25 @@ +[[!comment format=mdwn + username="oberix@c7a19cddb1663df0c612a979b9d13b0d67f1f69a" + nickname="oberix" + avatar="http://cdn.libravatar.org/avatar/e8b871f3d0bf96df9a3fc8cdca7abe09" + subject="autostart and foreground together doesn't seem to work" + date="2017-03-30T10:43:18Z" + content=""" +With systemd using `--autostart --foreground` either ignore foreground or quit immediatelly. + +I managed to have the process stay alive with `RemainAfterExit=on`: + + [Service] + User=%i + ExecStart=/usr/bin/git-annex assistant --autostart --foreground + ExecStop=/usr/bin/git-annex assistant --autostop + RemainAfterExit=on + Restart=on-failure + RestartSec=5 + +but git-annex processes does not maintain the `--foreground` option which is causing a lot of zombies in the long period (not totally clear why). + +My current solution is to have a service for each annex repository and avoid `--autosart` but this is annoying because it require to pass the path as `%I` and wrap git-annex in bash script to get the repo owner as the user. + + +"""]] |