|
|
@ -78,15 +78,13 @@ case "${ACTION}" in
|
|
|
|
do_install_detail
|
|
|
|
do_install_detail
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
"rm")
|
|
|
|
"rm")
|
|
|
|
IMAGE_NAME=$(uci get btcpayserver.@btcpayserver[0].image_name 2>/dev/null)
|
|
|
|
|
|
|
|
[ -z "$IMAGE_NAME" ] && IMAGE_NAME="btcpayserver"
|
|
|
|
|
|
|
|
CONTAINER_IDS=$(docker ps -a --filter "ancestor=${IMAGE_NAME}" --format '{{.ID}}')
|
|
|
|
|
|
|
|
echo "Stopping and removing containers..."
|
|
|
|
echo "Stopping and removing containers..."
|
|
|
|
|
|
|
|
CONTAINER_IDS=$(docker ps -a | grep 'btcpayserver\|generated_' | awk '{print $1}')
|
|
|
|
for ID in $CONTAINER_IDS; do
|
|
|
|
for ID in $CONTAINER_IDS; do
|
|
|
|
docker stop "$ID"
|
|
|
|
docker stop "$ID"
|
|
|
|
docker rm "$ID"
|
|
|
|
docker rm "$ID"
|
|
|
|
done
|
|
|
|
done
|
|
|
|
docker rmi -f "$IMAGE_NAME"
|
|
|
|
docker rmi -f $(docker images | grep 'btcpayserver' | awk '{print $3}')
|
|
|
|
rm -r /opt/docker2/compose/btcpayserver 2>/dev/null
|
|
|
|
rm -r /opt/docker2/compose/btcpayserver 2>/dev/null
|
|
|
|
rm -rf /opt/docker2/compose/btcpayserver/btcpayserver-docker 2>/dev/null # Removing the btcpayserver-docker directory
|
|
|
|
rm -rf /opt/docker2/compose/btcpayserver/btcpayserver-docker 2>/dev/null # Removing the btcpayserver-docker directory
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|