From 1a7f1cdad2357e38f982f77d11b3edb92a2c50f7 Mon Sep 17 00:00:00 2001 From: Didier Barzin Date: Wed, 22 Feb 2023 15:55:18 +0100 Subject: [PATCH] Logrotate --- install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install.sh b/install.sh index 533740f..d14382b 100755 --- a/install.sh +++ b/install.sh @@ -174,6 +174,16 @@ usermod -a -G tty $SUDO_USER # allow write to /var/log usermod -a -G syslog $SUDO_USER +# logrotate +sudo apt install logrotate +echo "/var/log/pandora-box.log {" > /etc/logrotate.d/pandora-box +echo " rotate 12" >> /etc/logrotate.d/pandora-box +echo " monthly" >> /etc/logrotate.d/pandora-box +echo " compress" >> /etc/logrotate.d/pandora-box +ecjo " missingok" >> /etc/logrotate.d/pandora-box +echo " notifempty" >> /etc/logrotate.d/pandora-box +echo "}" >> /etc/logrotate.d/pandora-box + # Start Pandora at boot cp pandora.service /etc/systemd/system/pandora.service sed -i "s/_USER_/$SUDO_USER/g" /etc/systemd/system/pandora.service