2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

Merge pull request #1163 from immarvin/onubt16.04syslog

fix issue#1159@github,add support for udp/tcp syslog reception for rsyslog shipped in ubuntu16.04
This commit is contained in:
Xiaopeng Wang 2016-05-20 14:52:11 +08:00
commit 0d70e4ffab

View File

@ -195,6 +195,16 @@ config_rsyslog_V8()
s/#\$ModLoad imtcp.so/\$ModLoad imtcp.so/;
s/#\$InputTCPServerRun <port>/\$InputTCPServerRun 514/' $remoteconf
fi
#ubuntu16.04 ships rsyslog 8.16.0,which does not ship remote.conf
#the configuration for UDP and TCP syslog reception is in rsyslog.conf
if [ -f "$conf_file" ]; then
sed -i 's/#module(load="imudp")/module(load="imudp")/;
s/#input(type="imudp" port="514")/input(type="imudp" port="514")/;
s/#module(load="imtcp")/module(load="imtcp")/;
s/#input(type="imtcp" port="514")/input(type="imtcp" port="514")/' $conf_file
fi
else
# not logging local, forward logging
# backup the existing remote.conf file from the install