<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thanks for the response, &nbsp;The -F flag was based on other posts.&nbsp;<div class="">If I remove the -F it does return but systemd keeps restarting it.&nbsp;</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 13, 2016, at 2:23 AM, Scheidler, Balázs &lt;<a href="mailto:balazs.scheidler@balabit.com" class="">balazs.scheidler@balabit.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><p dir="ltr" class="">-F specifies that syslog-ng should stay in the foreground.</p><p dir="ltr" class="">I assumed that it was needed for systemd. You could try --process-mode background</p><p dir="ltr" class="">That causes syslog-ng to go to the&nbsp; background but without its own supervisor.</p>
<div class="gmail_quote">On Apr 12, 2016 9:00 PM, "Scot Needy" &lt;<a href="mailto:scotrn@gmail.com" class="">scotrn@gmail.com</a>&gt; wrote:<br type="attribution" class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Hi,&nbsp;</div><div class=""><br class=""></div><div class="">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.&nbsp;</div><div class="">From systemd I think there is something missing in the control files that lets syslog-ng report that is started successfully.&nbsp;</div><div class=""><br class=""></div><div class="">When I add -F to&nbsp;SYSLOGNG_OPTS then systemctl start&nbsp;syslog-g.service never returns but syslog-ng does start.&nbsp;</div><div class=""><br class=""></div><div class="">Compiled syslog-ng &nbsp;syslog-ng 3.8.0alpha0 no problems.&nbsp;</div><div class="">On the command line syslog-ng will start fine.&nbsp;</div><div class="">&nbsp;/opt/syslog-ng/sbin/syslog-ng -f &nbsp;/opt/syslog-ng/etc/syslog-ng.conf -p &nbsp;/var/run/syslogd.pid</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Using &nbsp;contrib/systemd/syslog-ng.service as an example I created&nbsp;/usr/lib/systemd/system/syslog-ng.service&nbsp;</div><div class=""><br class=""></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class=""><div class=""><font size="1" class="">[Unit]</font></div></div><div class=""><div class=""><font size="1" class="">Description=System Logger Daemon</font></div></div><div class=""><div class=""><font size="1" class="">Documentation=man:syslog-ng(8)</font></div></div><div class=""><div class=""><font size="1" class=""><br class=""></font></div></div><div class=""><div class=""><font size="1" class="">[Service]</font></div></div><div class=""><div class=""><font size="1" class="">Type=notify</font></div></div><div class=""><div class=""><font size="1" class="">ExecStart=/opt/syslog-ng/sbin/syslog-ng $SYSLOGNG_OPTS</font></div></div><div class=""><div class=""><font size="1" class="">ExecReload=/bin/kill -HUP $MAINPID</font></div></div><div class=""><div class=""><font size="1" class="">EnvironmentFile=-/opt/syslog-ng/etc/syslog-ng.env</font></div></div><div class=""><div class=""><font size="1" class="">StandardOutput=journal</font></div></div><div class=""><div class=""><font size="1" class="">StandardError=journal</font></div></div><div class=""><div class=""><font size="1" class="">Restart=on-failure</font></div></div><div class=""><div class=""><font size="1" class=""><br class=""></font></div></div><div class=""><div class=""><font size="1" class="">[Install]</font></div></div><div class=""><div class=""><font size="1" class="">WantedBy=multi-user.target</font></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class="">cat &nbsp;/opt/syslog-ng/etc/syslog-ng.env</div><div class="">LD_LIBRARY_PATH=/usr/java/jdk1.8.0_77/jre/lib/amd64/server:$LD_LIBRARY_PATH</div><div class="">SYSLOGNG_OPTS="-f /opt/syslog-ng/etc/syslog-ng.conf -p /var/run/syslogd.pid"</div></div><div class=""><br class=""></div><div class=""><br class=""></div></blockquote><font size="1" class="">systemctl daemon-reload</font><div class=""><font size="1" class="">systemctl restart systemd-journald</font></div><div class=""><font size="1" class="">systemctl start &nbsp; &nbsp;syslog-ng.service</font></div><div class=""><font size="1" class="">systemctl status &nbsp; &nbsp;syslog-ng.service</font></div><div class=""><font size="1" class=""><div class="">● syslog-ng.service - System Logger Daemon</div><div class="">&nbsp; &nbsp;Loaded: loaded (/usr/lib/systemd/system/syslog-ng.service; enabled; vendor preset: enabled)</div><div class="">&nbsp; &nbsp;Active: inactive (dead) since Tue 2016-04-12 14:51:04 EDT; 29s ago</div><div class="">&nbsp; &nbsp; &nbsp;Docs: man:syslog-ng(8)</div><div class="">&nbsp; Process: 2494 ExecStart=/opt/syslog-ng/sbin/syslog-ng $SYSLOGNG_OPTS (code=exited, status=0/SUCCESS)</div><div class="">&nbsp;Main PID: 2494 (code=exited, status=0/SUCCESS)</div></font></div><div class=""><font size="1" class=""><br class=""></font></div><div class=""><font size="1" class=""><br class=""></font></div><div class=""><font size="1" class=""><div class="">Apr 12 14:41:08 loghost systemd[1]: Unit syslog-ng.service entered failed state.</div><div class="">Apr 12 14:41:08 loghost systemd[1]: syslog-ng.service failed.</div><div class="">Apr 12 14:41:08 loghost systemd[1]: syslog-ng.service holdoff time over, scheduling restart.</div><div class="">Apr 12 14:41:08 loghost systemd[1]: Starting System Logger Daemon...</div></font></div><div class=""><font size="1" class=""><br class=""></font></div><div class=""><font size="1" class=""><br class=""></font></div><div class=""><font size="1" class="">I can see syslog-ng starting and stoping over and over from /var/log/messages&nbsp;</font></div><div class=""><font size="1" class=""><br class=""></font><div class=""><br class=""></div></div></div><br class="">______________________________________________________________________________<br class="">
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank" class="">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br class="">
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank" class="">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br class="">
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank" class="">http://www.balabit.com/wiki/syslog-ng-faq</a><br class="">
<br class="">
<br class=""></blockquote></div>
______________________________________________________________________________<br class="">Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" class="">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br class="">Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" class="">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br class="">FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" class="">http://www.balabit.com/wiki/syslog-ng-faq</a><br class=""><br class=""></div></blockquote></div><br class=""></div></body></html>