From f433c5a8d3b10f316c485da3e7056af2c1391d97 Mon Sep 17 00:00:00 2001 From: Christian Boettcher <c.boettcher@fz-juelich.de> Date: Tue, 29 Mar 2022 09:11:20 +0200 Subject: [PATCH] setup deletion of old logs (>2 weeks) --- scripts/cloudinit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/cloudinit.yml b/scripts/cloudinit.yml index 56ad8cb..f0fdcc9 100644 --- a/scripts/cloudinit.yml +++ b/scripts/cloudinit.yml @@ -62,6 +62,7 @@ runcmd: - echo "Current user is $(whoami)" - sudo -u airflow git clone https://gitlab.jsc.fz-juelich.de/eflows4hpc-wp2/data-logistics-service.git ./data-logistics-service - cd ./data-logistics-service + - crontab -l | { cat ; echo '@daily root find /persistent_data/logs -mtime +13 -type f -delete'; } | crontab - # setup log clearing crontab - touch /finished_cloudinit final_message: "The system is finally up, after $UPTIME seconds" \ No newline at end of file -- GitLab