uci-docker-nextcloud/dev/scrub

18 lines
448 B
Plaintext
Raw Normal View History

2024-09-12 16:21:59 -07:00
#!/bin/bash
if [[ -d opt ]]; then
echo "want to scrub scurb $PWD/opt and the volume test-opt (yes) ?"
read ans
if [[ $ans == "yes" ]]; then
echo scrubbing ./opt/*;
rm -rf ./opt/*
docker container stop try-ucommandit-nextcloud 2>/dev/null
docker container rm try-ucommandit-nextcloud 2> /dev/null
echo removing docker volume test-opt
docker volume rm test_opt
else
echo scrub aborted
fi
else
echo no directory opt to scrub, making one
mkdir opt
fi