Add uninstall-dockge script and README.md

This commit is contained in:
Christopher
2023-11-21 13:49:24 -06:00
parent db9b6854d0
commit 339e5c5ea6
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
## Why?
The script is a Bash script designed to facilitate the uninstallation of Dockge, a containerized application.
## How to use?
```bash
bash -c "$(wget -qLO - https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/uninstall-dockge/run.sh)"
```

27
uninstall-dockge/run.sh Normal file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
# Check if the script is run as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root."
exit 1
fi
# Stop and remove the Dockge containers
if command -v docker &> /dev/null; then
# Using Docker CE
echo "Stopping and removing Dockge containers with Docker CE..."
docker compose -f /opt/dockge/compose.yaml -p dockge down
elif command -v podman &> /dev/null; then
# Using Podman
echo "Stopping and removing Dockge containers with Podman..."
podman-compose -f /opt/dockge/compose.yaml down
else
echo "Neither Docker CE nor Podman is installed. Nothing to uninstall."
exit 1
fi
# Remove the Dockge directories
echo "Removing Dockge directories..."
rm -rf /opt/stacks /opt/dockge
echo "Dockge has been uninstalled."