docs: Add 16, update 2 and remove 2 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 9s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 9s
This commit is contained in:
22
graylog/uninstall.sh
Executable file
22
graylog/uninstall.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/common.sh"
|
||||
_check_required_env_vars "CONTAINER_NAME"
|
||||
|
||||
# UNINSTALL SCRIPT
|
||||
# The uninstall script is required for all templates.
|
||||
# It is used to uninstall the service from the server.
|
||||
# IMPORTANT: This script MUST preserve data volumes!
|
||||
|
||||
# Stop and remove containers
|
||||
docker compose -p "${CONTAINER_NAME}" down 2>/dev/null || true
|
||||
|
||||
# Verify containers are removed
|
||||
for suffix in "" "_mongodb" "_opensearch"; do
|
||||
container="${CONTAINER_NAME}${suffix}"
|
||||
if docker ps -a --format "{{.Names}}" | grep -q "^${container}$"; then
|
||||
docker rm -f "$container" 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Uninstallation of ${CONTAINER_NAME} complete."
|
||||
echo "Data volumes preserved. To remove all data, use destroy.sh"
|
||||
Reference in New Issue
Block a user