debug mode
This commit is contained in:
10
run.sh
10
run.sh
@@ -9,6 +9,9 @@ TARGET_PROTO=${TARGET_PROTO:-tcp}
|
||||
# 514 is the common default
|
||||
TARGET_PORT=${TARGET_PORT:-514}
|
||||
|
||||
# DEBUG MODE ENABLED if != 0
|
||||
DEBUG=${DEBUG:-0}
|
||||
|
||||
cat >/etc/rsyslog.conf <<EOF
|
||||
\$WorkDirectory /var/lib/rsyslog
|
||||
|
||||
@@ -34,6 +37,13 @@ if (\$hostname == '') then set \$!hostname = \$fromhost;
|
||||
|
||||
EOF
|
||||
|
||||
if [ "${DEBUG}" != "0" ] ; then
|
||||
cat >>/etc/rsyslog.conf <<EOF
|
||||
module(load="omstdout")
|
||||
action(type="omstdout")
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "${TARGET_PROTO}" = "udp" ] ; then
|
||||
cat >>/etc/rsyslog.conf <<EOF
|
||||
action(type="omfwd" protocol="udp" target="${TARGET_HOST}" port="${TARGET_PORT}" Template="RSYSLOG_SyslogRFC5424Format" )
|
||||
|
||||
Reference in New Issue
Block a user