open-w / confirm_remove.sh
github-actions[bot]
GitHub deploy: 4831c9e57e35a0619d9212b7b573e2c6a9443c8c
0fe4404
raw
history blame contribute delete
356 Bytes
#!/bin/bash
echo "Warning: This will remove all containers and volumes, including persistent data. Do you want to continue? [Y/N]"
read ans
if [ "$ans" == "Y" ] || [ "$ans" == "y" ]; then
command docker-compose 2>/dev/null
if [ "$?" == "0" ]; then
docker-compose down -v
else
docker compose down -v
fi
else
echo "Operation cancelled."
fi