mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-03 18:09:03 +02:00
setup logrotate for Tor on ext. disk
This commit is contained in:
@@ -377,6 +377,28 @@ EOF
|
|||||||
/home/admin/config.scripts/internet.hiddenservice.sh lnbits 80 5000
|
/home/admin/config.scripts/internet.hiddenservice.sh lnbits 80 5000
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Setup logrotate"
|
||||||
|
if ! grep -Eq "^/mnt/hdd/tor/" /etc/logrotate.d/tor; then
|
||||||
|
# add logrotate config for modified Tor dir on ext. disk
|
||||||
|
cat << EOF | sudo tee -a /etc/logrotate.d/tor >/dev/null
|
||||||
|
/mnt/hdd/tor/*log {
|
||||||
|
daily
|
||||||
|
rotate 5
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
create 0640 bitcoin bitcoin
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
if invoke-rc.d tor status > /dev/null; then
|
||||||
|
invoke-rc.d tor reload > /dev/null
|
||||||
|
fi
|
||||||
|
endscript
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
echo "OK - TOR is now ON"
|
echo "OK - TOR is now ON"
|
||||||
echo "needs reboot to activate new setting"
|
echo "needs reboot to activate new setting"
|
||||||
exit 0
|
exit 0
|
||||||
|
Reference in New Issue
Block a user