Skip to content

Instantly share code, notes, and snippets.

@romeuhcf
Last active November 1, 2018 20:44
Show Gist options
  • Save romeuhcf/f22a535d1204896ecfa551474cf5d0d0 to your computer and use it in GitHub Desktop.
Save romeuhcf/f22a535d1204896ecfa551474cf5d0d0 to your computer and use it in GitHub Desktop.
set -e
tee /etc/logrotate.d/bluepill << END
/var/log/bluepill.log {
rotate 7
daily
missingok
notifempty
sharedscripts
copytruncate
compress
}
END
(
echo 'if $syslogfacility-text == "local6" and $programname startswith "bluepilld" then /var/log/bluepill.log'
echo '& ~'
) > /etc/rsyslog.d/00-bluepill.conf
service rsyslog restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment