Syslog: added log rotation settings

This commit is contained in:
bergware
2019-02-27 17:14:34 +01:00
parent a9a0048800
commit 8c5dfb3c65

View File

@@ -6,8 +6,8 @@ LOG=/etc/logrotate.d/rsyslog.local
if grep -qP '^#\*\.\* \?remote$' $ETC; then
sed -ri 's/^#(\*\.\* \?remote)$/\1/' $ETC
/etc/rc.d/rc.rsyslogd restart &> /dev/null
fi
if [[ -f $USB ]]; then
cp -f $USB $LOG
chmod 644 $LOG
if [[ -f $USB ]]; then
cp -f $USB $LOG
chmod 644 $LOG
fi
fi