add /tmp directory cleanup to run every day

This commit is contained in:
Karol Wypchlo 2020-04-23 19:39:53 +02:00 committed by Karol Wypchło
parent bba571c4e3
commit 01bb55507f
1 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,10 @@ sudo mkdir -p /var/log/journal
sudo cp journald.conf /etc/systemd/journald.conf sudo cp journald.conf /etc/systemd/journald.conf
sudo systemctl restart systemd-journald sudo systemctl restart systemd-journald
# Setup periodical /tmp cleanup so we don't run out of disk space
# - deletes anything older than 10 days from /tmp, crontab is set to run it every day at midnight
(sudo crontab -l 2>/dev/null; echo "0 0 * * * find /tmp -type f -atime +10 -delete >/dev/null 2>&1") | sudo crontab -
# Setup skynet frontend. # Setup skynet frontend.
cd .. cd ..
yarn yarn