mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 22:58:43 +01:00
setup logrotate for Tor on ext. disk
This commit is contained in:
parent
c8fc40adf4
commit
92c609bc32
1 changed files with 22 additions and 0 deletions
|
@ -377,6 +377,28 @@ EOF
|
|||
/home/admin/config.scripts/internet.hiddenservice.sh lnbits 80 5000
|
||||
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 "needs reboot to activate new setting"
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Reference in a new issue