Solved free disc space bugs

This commit is contained in:
Kevin Veen-Birkenbach 2023-04-16 14:06:37 +02:00
parent de5d5e4ce4
commit 26ef7e00f0
3 changed files with 7 additions and 6 deletions

View File

@ -1,13 +1,13 @@
- name: "create {{free_disc_space_folder}"
- name: "create {{free_disc_space_folder}}"
file:
path: "{{free_disc_space_folder}"
path: "{{free_disc_space_folder}}"
state: directory
mode: 0755
- name: create free-disc-space.sh
template:
src: free-disc-space.sh.j2
dest: "{{free_disc_space_folder}free-disc-space.sh"
dest: "{{free_disc_space_folder}}free-disc-space.sh"
- name: create free-disc-space.service
template:

View File

@ -34,6 +34,7 @@ if [ "$disc_use_percent_number" -gt "$minimum_percent_free_disc_space" ] || [ "$
nextcloud_application_container="nextcloud-application-1"
if [ "$(docker ps -a -q -f name=$nextcloud_application_container)" ] ; then
echo "cleaning up docker nextcloud" &&
docker exec -it -u www-data $nextcloud_application_container /var/www/html/occ files:cleanup || exit 4
docker exec -it -u www-data $nextcloud_application_container /var/www/html/occ trashbin:cleanup --all-users || exit 5
docker exec -it -u www-data $nextcloud_application_container /var/www/html/occ versions:cleanup || exit 6
@ -45,7 +46,7 @@ if [ "$disc_use_percent_number" -gt "$minimum_percent_free_disc_space" ] || [ "$
yes | pacman -Sc || exit 7
echo "cleanup finished."
elif
else
echo "Sufficiend disc space available."
echo "To force the freeing of disc space pass the parameter --force."
fi