significant tidying to logserver
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 38s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 38s
This commit is contained in:
22
logclient/destroy.sh
Executable file
22
logclient/destroy.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/common.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/_volumes.sh"
|
||||
|
||||
_check_required_env_vars "CONTAINER_NAME"
|
||||
|
||||
echo "WARNING: This will permanently delete all data for ${CONTAINER_NAME}"
|
||||
echo "This action cannot be undone!"
|
||||
echo ""
|
||||
|
||||
# Since scripts must be non-interactive, only proceed if explicitly called
|
||||
bash ./stop.sh || true
|
||||
_remove_container "$CONTAINER_NAME" || true
|
||||
|
||||
# Remove all volumes
|
||||
for volume in $(get_logclient_volumes); do
|
||||
volume_name=$(echo $volume | cut -d: -f3)
|
||||
echo "Removing volume: $volume_name"
|
||||
docker volume rm "$volume_name" 2>/dev/null || true
|
||||
done
|
||||
|
||||
echo "Service and all data destroyed"
|
Reference in New Issue
Block a user