<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=""><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Hi, </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. </div><div class="">From systemd I think there is something missing in the control files that lets syslog-ng report that is started successfully. </div><div class=""><br class=""></div><div class="">When I add -F to SYSLOGNG_OPTS then systemctl start syslog-g.service never returns but syslog-ng does start. </div><div class=""><br class=""></div><div class="">Compiled syslog-ng syslog-ng 3.8.0alpha0 no problems. </div><div class="">On the command line syslog-ng will start fine. </div><div class=""> /opt/syslog-ng/sbin/syslog-ng -f /opt/syslog-ng/etc/syslog-ng.conf -p /var/run/syslogd.pid</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Using contrib/systemd/syslog-ng.service as an example I created /usr/lib/systemd/system/syslog-ng.service </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 /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 syslog-ng.service</font></div><div class=""><font size="1" class="">systemctl status syslog-ng.service</font></div><div class=""><font size="1" class=""><div class="">● syslog-ng.service - System Logger Daemon</div><div class=""> Loaded: loaded (/usr/lib/systemd/system/syslog-ng.service; enabled; vendor preset: enabled)</div><div class=""> Active: inactive (dead) since Tue 2016-04-12 14:51:04 EDT; 29s ago</div><div class=""> Docs: man:syslog-ng(8)</div><div class=""> Process: 2494 ExecStart=/opt/syslog-ng/sbin/syslog-ng $SYSLOGNG_OPTS (code=exited, status=0/SUCCESS)</div><div class=""> 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 </font></div><div class=""><font size="1" class=""><br class=""></font><div class=""><br class=""></div></div></body></html>