From 9c63e9707f8f971658ecc463e2f89839a2fe30aa Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 11 Feb 2023 19:30:02 +0100 Subject: [PATCH] rm does not work if there are too many sessions Signed-off-by: Simon L --- Containers/mastercontainer/daily-backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/daily-backup.sh b/Containers/mastercontainer/daily-backup.sh index 907b0df3..c063b185 100644 --- a/Containers/mastercontainer/daily-backup.sh +++ b/Containers/mastercontainer/daily-backup.sh @@ -11,7 +11,7 @@ fi # Delete all active sessions and create a lock file # But don't kick out the user if the mastercontainer was just updated since we block the interface either way with the lock file if [ "$LOCK_FILE_PRESENT" = 0 ] || ! [ -f "/mnt/docker-aio-config/data/daily_backup_running" ]; then - rm -f "/mnt/docker-aio-config/session/"* + find "/mnt/docker-aio-config/session/" -mindepth 1 -delete fi sudo -u www-data touch "/mnt/docker-aio-config/data/daily_backup_running"