Skip to content

Commit

Permalink
Merge pull request #407 from splunk/fix-startup
Browse files Browse the repository at this point in the history
Fix startup
  • Loading branch information
Ryan Faircloth authored and GitHub committed Apr 10, 2020
2 parents 742f5f8 + 24170b9 commit 4d83da9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
f_test_test,sc4s_vendor_product,"test_test"
f_brocade_syslog,sc4s_vendor_product,"brocade_syslog"
f_null_queue,sc4s_vendor_product,"catch_first"
f_null_queue,sc4s_vendor_product,"null_queue"
f_cisco_meraki,sc4s_vendor_product,"cisco_meraki"
f_citrix_netscaler,sc4s_vendor_product,"citrix_netscaler"
f_dell_rsa_secureid,sc4s_vendor_product,"dell_rsa_secureid"
Expand Down
2 changes: 1 addition & 1 deletion package/etc/go_templates/source_network.t
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ source s_{{ .port_id }} {
source {
{{- if or (getenv (print "SC4S_LISTEN_" .port_id "_UDP_PORT")) (eq .port_id "DEFAULT") }}
{{- $port_id := .port_id }}
{{- range (math.Seq (getenv "SC4S_SOURCE_LISTEN_UDP_SOCKETS" "5"))}}
{{- range (math.Seq (getenv "SC4S_SOURCE_LISTEN_UDP_SOCKETS" "1"))}}
{{- $context := dict "instance" . "port_id" $port_id }}
{{- template "UDP" $context }}
{{- end}}
Expand Down
12 changes: 7 additions & 5 deletions package/sbin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ echo sc4s version=$(cat /VERSION) >/opt/syslog-ng/var/log/syslog-ng.out
echo syslog-ng starting
/opt/syslog-ng/bin/persist-tool add /opt/syslog-ng/etc/reset_persist -o /opt/syslog-ng/var

/opt/syslog-ng/sbin/syslog-ng -F $@ &
/opt/syslog-ng/sbin/syslog-ng $@ &
pid="$!"
# wait forever
while true
do
tail -f /dev/null & wait ${!}
done
if [[ $@ != *"-s"* ]]; then
while true
do
tail -f /dev/null & wait ${!}
done
fi

0 comments on commit 4d83da9

Please sign in to comment.