no more error

This commit is contained in:
goldsquid
2025-12-20 09:53:37 +07:00
parent 5808945ef1
commit c5ab00f29c

View File

@@ -69,7 +69,19 @@ for key in $keys; do
echo " Volume _data directory not found, skipping symlink check"
fi
# Remove the docker volume
docker volume rm "rpc_$key" 2>/dev/null
# Remove the docker volume (ignore error if volume doesn't exist)
if docker volume rm "rpc_$key" 2>/dev/null; then
echo " ✓ Volume removed successfully"
else
# Check if volume exists - if not, that's fine, exit with 0
if ! docker volume inspect "rpc_$key" &>/dev/null; then
echo " Volume does not exist, skipping"
else
echo " ✗ Failed to remove volume (may require root or may be in use)"
fi
fi
done
# Exit successfully even if some volumes didn't exist
exit 0