if sockets-to-exclude file is not empty

This commit is contained in:
julien 2025-01-19 18:06:35 +01:00
parent 8d2a882507
commit d02b616ea0

View File

@ -27,7 +27,9 @@ if [ -d "volumes" ]; then
# List sockets to exclude
find . -type s -print > /tmp/sockets-to-exclude
sed -i 's/volumes\///g' /tmp/sockets-to-exclude
if grep -q volumes "/tmp/sockets-to-exclude"; then
sed -i 's/volumes\///g' /tmp/sockets-to-exclude
fi
# Compress all volumes excerpt mysql and postgres
BACKUP=${PWD##*/}.tar.zst