Hi,has anyone else tried to launch the in.imapproxyd at startup on a system using systemd instead of SysV init? At first sight I thought this should be pretty straightforward, but when I tried it, I ran into trouble.
In the systemd unit file I wrote, I tried several things, especially using "Type=forking" and "Type=simple", but neither yielded satisfactory results. Also, I fiddled with systemd's StandardInput and StandardOutput options, but to no avail.
What is most striking, though, is that in the logfile, Imapproxy claims "Daemonize(): Configured to run in foreground mode." when it is launched by systemd. In /etc/imapproxy.conf, however, I clearly set "foreground_mode no" and since the other options from the config file (e.g. server_hostname) are in fact picked up, I don't know why Imapproxy would be running in foreground mode. I suspect this to have something to do with the way systemd starts processes, because when I run "/usr/local/sbin/in.imapproxyd -p /var/run/imapproxy.pid" on the command line as root, everything is fine. Another strange thing is that the PID file given with the "-p" option is not created when Imapproxy is started from systemd, but it is created when running from command line. Does anyone have an idea how to deal with this? Maybe Imapproxy needs some environment variables that aren't set by default when using systemd?
BTW, I'm trying all of this using Imapproxy version 1.2.7, compiled with gcc 4.8.5., on a CentOS 7 box.
Here's what my current unit file looks like: [Unit] Description=Proxy IMAP server by the Squirrelmail Project After=network-online.target [Service] #Type=forking Type=simple PIDFile=/var/run/imapproxy.pid #StandardInput=null #StandardOutput=null ExecStart=/usr/local/sbin/in.imapproxyd -p /var/run/imapproxy.pid Restart=on-failure [Install] WantedBy=multi-user.target Thanks Jens -- Jens Wahnes Universität zu Köln Regionales Rechenzentrum (RRZK) Weyertal 121 · 50931 Köln · Lageplan: http://ukoeln.de/BDKS6 Tel. (0221) 470-89614
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape
----- squirrelmail-imapproxy mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: squirrelmail-imapproxy@lists.sourceforge.net List archives: http://news.gmane.org/gmane.mail.squirrelmail.imapproxy List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-imapproxy