From: Zoltán Felleg Date: Wed, 8 Dec 2021 23:00:43 +0000 (+0100) Subject: Updated ls.in (updated rsyslog and logrotate rules). X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=79d694fe0328481eb1980722170ab00ddfa68f94;p=user-lxc.git Updated ls.in (updated rsyslog and logrotate rules). --- diff --git a/sources/ls.in/postinstall/20_setuprsyslog.sh b/sources/ls.in/postinstall/20_setuprsyslog.sh index 1e00c30..04ae3c8 100755 --- a/sources/ls.in/postinstall/20_setuprsyslog.sh +++ b/sources/ls.in/postinstall/20_setuprsyslog.sh @@ -3,8 +3,12 @@ mv /etc/rsyslog.conf /etc/rsyslog.conf.orig -sed -e 's/^#module(load="imudp")/module(load="imudp")/' \ +sed --in-place=.orig \ + -e 's/^#module(load="imudp")/module(load="imudp")/' \ -e 's/^#input(type="imudp" port="514")/input(type="imudp" port="514")/' \ -e 's/^#module(load="imtcp")/module(load="imtcp")/' \ -e 's/^#input(type="imtcp" port="514")/input(type="imtcp" port="514")/' \ - /etc/rsyslog.conf + /etc/rsyslog.conf + +echo >>/etc/rsyslog.conf +echo "*.* /var/log/remote/everything.log" >>/etc/rsyslog.conf diff --git a/sources/ls.in/postinstall/install/etc/logrotate.d/remote b/sources/ls.in/postinstall/install/etc/logrotate.d/remote new file mode 100644 index 0000000..667fec8 --- /dev/null +++ b/sources/ls.in/postinstall/install/etc/logrotate.d/remote @@ -0,0 +1,11 @@ +/var/log/remote/everything.log +{ + rotate -1 + daily + missingok + compress + dateext + postrotate + /usr/bin/systemctl kill -s HUP rsyslog.service >/dev/null 2>&1 || true + endscript +}