On Wed, 2011-11-30 at 11:50 +0100, Thomas Wollner wrote:
Hi,
currently I`m using syslog-ng 3.3.3 from madhouse package. In addition to the behaviour with the dash shell I found out that 3.3.3 does not handle signalling to scripts spawned by program destination.
Example:
in 3.1.3 this was a valid config statement:
destination d_raw_firewall_sec { program("`/opt/sec/bin/secStart firewall`" template(t_sec_template)); };
Have a look at the backticks inside the program.
After changing /bin/dash nach /bin/bash everything worked fine.
Backticks are now defined within syslog-ng too to substitute @defined variables and environment vars (and block arguments): @define logdir /var/log/remote destination d_file { file("`logdir`/$HOST/messages.log"); };
in 3.3.3. I have to change from backtick to $(...) style:
destination d_raw_firewall_sec { program("$(/opt/sec/bin/secStart firewall)" template(t_sec_template)); };
This works, but upon restart / reload of syslog-ng the "old" spawned scripts are not receiving the kill / term / hup signals and stay in the process list of the system until killed manually.
The $(/opt/sec/bin/secStart firewall) evaluates to the following:
"/opt/sec/bin/sec.pl -conf=/opt/sec/rules/firewall.rule -pid=/opt/sec/var/run/sec-firewall.pid -dump=/opt/sec/dump/sec-firewall.dump -debug=5 -syslog=local1 -intcontexts -intevents -input=-"
I know about an issue about program() destination and SIGHUP processing. For some reason it restarts a program one extra time during SIGHUP processing, which I haven't looked into yet. -- Bazsi