From 01bb55507f593cb3acec2920b94a4638b162bee6 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 23 Apr 2020 19:39:53 +0200 Subject: [PATCH] add /tmp directory cleanup to run every day --- setup-scripts/setup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup-scripts/setup.sh b/setup-scripts/setup.sh index d12988d4..19ae9426 100755 --- a/setup-scripts/setup.sh +++ b/setup-scripts/setup.sh @@ -71,6 +71,10 @@ sudo mkdir -p /var/log/journal sudo cp journald.conf /etc/systemd/journald.conf 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. cd .. yarn