mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-01-04 04:51:59 +08:00
address review
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
4174e39f2b
commit
b0fc3fb953
1 changed files with 9 additions and 1 deletions
|
@ -2,8 +2,16 @@
|
|||
set -eux
|
||||
|
||||
while true; do
|
||||
# Check for updates and send notification if yes
|
||||
sudo -u www-data php /var/www/docker-aio/php/src/Cron/cron.php
|
||||
# Remove dangling images
|
||||
sudo -u www-data docker image prune -f
|
||||
sudo -u www-data docker volume prune -f
|
||||
# Remove dangling volumes
|
||||
unset DANGLING_VOLUMES
|
||||
DANGLING_VOLUMES="$(sudo -u www-data docker volume ls --filter dangling=true | awk '{print $2}' | grep -v "nextcloud_aio_\|^VOLUME$")"
|
||||
mapfile -t DANGLING_VOLUMES <<< "$DANGLING_VOLUMES"
|
||||
for volume in "${DANGLING_VOLUMES[@]}"; do
|
||||
sudo -u www-data docker volume rm "$volume"
|
||||
done
|
||||
sleep 1d
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue