From: Paul L. <pa...@sq...> - 2016-09-12 18:48:57
|
On 2016年08月02日 04:11, Thomas Barth wrote: > Thanks for the trick! No timeout with type simple. It s ok for me. Main > thing is that it works. > > > Am 02.08.2016 um 12:45 schrieb Jens Wahnes: >> Thomas Barth wrote: >> >>> The unit file is: >>> >>> /lib/systemd/system/imapproxy.service >>> >>> [Unit] >>> Documentation=man:imapproxyd(8) >>> Description=IMAP proxy >>> After=network-online.target >>> Wants=network-online.target >>> >>> [Service] >>> Type=forking >>> ExecStart=/usr/sbin/imapproxyd -f /etc/imapproxy.conf >>> >> >> I see. So the main difference between my unit file and this one seems >> to be the "type" of service. Previously, I had tried "Type=forking" as >> well, but since that didn't work out very well, I went to try >> "Type=simple". For me, this is doing the trick so far, but as I >> pointed out before, I'm terribly satisfied with this approch. Well, >> you still may want to give that a shot anyway and see if it works for >> you. The problem here is that systemd apparently starts services from PID 1, and there was a check in the code to make sure the parent wasn't PID 1 because in other contexts, that would have meant the parent was already detached and imapproxy was in fact daemonized already. I removed that check which fixes this issue, hoping that that it wasn't really feasible in any other context that the code could have come to try to re-daemonize anyway. I'll probably add this unit file as well: [Unit] Description=SquirrelMail IMAP proxy server After=network.target network-online.target local-fs.target syslog.target remote-fs.target nss-lookup.target [Service] Type=forking ExecStart=/usr/local/sbin/in.imapproxyd Restart=always RestartSec=5 [Install] WantedBy=multi-user.target -- Paul Lesniewski SquirrelMail Team Please support Open Source Software by donating to SquirrelMail! http://squirrelmail.org/donate_paul_lesniewski.php |