mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
Cron: clean nextcloud-aio-domaincheck/tmp volumes
Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
parent
c3d3a29c6b
commit
e85c43d075
1 changed files with 7 additions and 1 deletions
|
|
@ -47,8 +47,14 @@ while true; do
|
||||||
# Remove sessions older than 24h
|
# Remove sessions older than 24h
|
||||||
find "/mnt/docker-aio-config/session/" -mindepth 1 -mmin +1440 -delete
|
find "/mnt/docker-aio-config/session/" -mindepth 1 -mmin +1440 -delete
|
||||||
|
|
||||||
|
# Remove nextcloud-aio-domaincheck container
|
||||||
|
docker container remove nextcloud-aio-domaincheck --force
|
||||||
|
|
||||||
# Remove dangling images
|
# Remove dangling images
|
||||||
sudo -u www-data docker image prune -f
|
sudo -u www-data docker image prune --force
|
||||||
|
|
||||||
|
# Remove dangling volumes
|
||||||
|
for image in $(docker volume ls --quiet --filter dangling=true | grep -E "^[a-z0-9]{64}$"); do docker volume remove "$image"; done
|
||||||
|
|
||||||
# Wait 60s so that the whole loop will not be executed again
|
# Wait 60s so that the whole loop will not be executed again
|
||||||
sleep 60
|
sleep 60
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue