<p dir="ltr">-F specifies that syslog-ng should stay in the foreground.</p>
<p dir="ltr">I assumed that it was needed for systemd. You could try --process-mode background</p>
<p dir="ltr">That causes syslog-ng to go to the background but without its own supervisor.</p>
<div class="gmail_quote">On Apr 12, 2016 9:00 PM, "Scot Needy" <<a href="mailto:scotrn@gmail.com">scotrn@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div><br></div><div>Hi, </div><div><br></div><div>I need help setting up my control files for systemd I can’t figure out what I am doing wrong. If I make a SystemV start stop script it runs fine. </div><div>From systemd I think there is something missing in the control files that lets syslog-ng report that is started successfully. </div><div><br></div><div>When I add -F to SYSLOGNG_OPTS then systemctl start syslog-g.service never returns but syslog-ng does start. </div><div><br></div><div>Compiled syslog-ng syslog-ng 3.8.0alpha0 no problems. </div><div>On the command line syslog-ng will start fine. </div><div> /opt/syslog-ng/sbin/syslog-ng -f /opt/syslog-ng/etc/syslog-ng.conf -p /var/run/syslogd.pid</div><div><br></div><div><br></div><div>Using contrib/systemd/syslog-ng.service as an example I created /usr/lib/systemd/system/syslog-ng.service </div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><font size="1">[Unit]</font></div></div><div><div><font size="1">Description=System Logger Daemon</font></div></div><div><div><font size="1">Documentation=man:syslog-ng(8)</font></div></div><div><div><font size="1"><br></font></div></div><div><div><font size="1">[Service]</font></div></div><div><div><font size="1">Type=notify</font></div></div><div><div><font size="1">ExecStart=/opt/syslog-ng/sbin/syslog-ng $SYSLOGNG_OPTS</font></div></div><div><div><font size="1">ExecReload=/bin/kill -HUP $MAINPID</font></div></div><div><div><font size="1">EnvironmentFile=-/opt/syslog-ng/etc/syslog-ng.env</font></div></div><div><div><font size="1">StandardOutput=journal</font></div></div><div><div><font size="1">StandardError=journal</font></div></div><div><div><font size="1">Restart=on-failure</font></div></div><div><div><font size="1"><br></font></div></div><div><div><font size="1">[Install]</font></div></div><div><div><font size="1">WantedBy=multi-user.target</font></div></div><div><br></div><div><br></div><div><div>cat /opt/syslog-ng/etc/syslog-ng.env</div><div>LD_LIBRARY_PATH=/usr/java/jdk1.8.0_77/jre/lib/amd64/server:$LD_LIBRARY_PATH</div><div>SYSLOGNG_OPTS="-f /opt/syslog-ng/etc/syslog-ng.conf -p /var/run/syslogd.pid"</div></div><div><br></div><div><br></div></blockquote><font size="1">systemctl daemon-reload</font><div><font size="1">systemctl restart systemd-journald</font></div><div><font size="1">systemctl start syslog-ng.service</font></div><div><font size="1">systemctl status syslog-ng.service</font></div><div><font size="1"><div>● syslog-ng.service - System Logger Daemon</div><div> Loaded: loaded (/usr/lib/systemd/system/syslog-ng.service; enabled; vendor preset: enabled)</div><div> Active: inactive (dead) since Tue 2016-04-12 14:51:04 EDT; 29s ago</div><div> Docs: man:syslog-ng(8)</div><div> Process: 2494 ExecStart=/opt/syslog-ng/sbin/syslog-ng $SYSLOGNG_OPTS (code=exited, status=0/SUCCESS)</div><div> Main PID: 2494 (code=exited, status=0/SUCCESS)</div></font></div><div><font size="1"><br></font></div><div><font size="1"><br></font></div><div><font size="1"><div>Apr 12 14:41:08 loghost systemd[1]: Unit syslog-ng.service entered failed state.</div><div>Apr 12 14:41:08 loghost systemd[1]: syslog-ng.service failed.</div><div>Apr 12 14:41:08 loghost systemd[1]: syslog-ng.service holdoff time over, scheduling restart.</div><div>Apr 12 14:41:08 loghost systemd[1]: Starting System Logger Daemon...</div></font></div><div><font size="1"><br></font></div><div><font size="1"><br></font></div><div><font size="1">I can see syslog-ng starting and stoping over and over from /var/log/messages </font></div><div><font size="1"><br></font><div><br></div></div></div><br>______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
<br></blockquote></div>