mirror of
https://github.com/bigbeartechworld/big-bear-scripts.git
synced 2026-07-28 16:22:34 -04:00
Add uninstall-dockge script and README.md
This commit is contained in:
9
uninstall-dockge/README.md
Normal file
9
uninstall-dockge/README.md
Normal 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
27
uninstall-dockge/run.sh
Normal 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."
|
||||
Reference in New Issue
Block a user