1
0
Fork 0
mirror of https://github.com/dbarzin/pandora-box.git synced 2025-07-19 13:29:42 +02:00

Logrotate

This commit is contained in:
Didier Barzin 2023-02-22 15:55:18 +01:00 committed by GitHub
parent b6dc0dd7a5
commit 1a7f1cdad2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,6 +174,16 @@ usermod -a -G tty $SUDO_USER
# allow write to /var/log # allow write to /var/log
usermod -a -G syslog $SUDO_USER 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 # Start Pandora at boot
cp pandora.service /etc/systemd/system/pandora.service cp pandora.service /etc/systemd/system/pandora.service
sed -i "s/_USER_/$SUDO_USER/g" /etc/systemd/system/pandora.service sed -i "s/_USER_/$SUDO_USER/g" /etc/systemd/system/pandora.service