
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 35s
29 lines
908 B
Bash
Executable File
29 lines
908 B
Bash
Executable File
#!/bin/bash
|
|
# shellcheck disable=SC1091
|
|
source "${AGENT_PATH}/common.sh"
|
|
_check_required_env_vars "CONTAINER_NAME" "STATE_VOLUME"
|
|
|
|
# Tailscale Uninstallation Script
|
|
|
|
echo "Uninstalling Tailscale service..."
|
|
|
|
# Stop the container if it's running
|
|
if _is_container_running "$CONTAINER_NAME"; then
|
|
echo "Stopping Tailscale container..."
|
|
_stop_container "$CONTAINER_NAME"
|
|
fi
|
|
|
|
# Remove the container
|
|
if _is_container_exists "$CONTAINER_NAME"; then
|
|
echo "Removing Tailscale container..."
|
|
_remove_container "$CONTAINER_NAME"
|
|
fi
|
|
|
|
echo "Tailscale service has been uninstalled."
|
|
echo ""
|
|
echo "Note: The Tailscale state volume (${STATE_VOLUME}) has been preserved."
|
|
echo "This maintains your Tailscale node configuration and keys."
|
|
echo "To completely remove all data, run:"
|
|
echo " docker volume rm ${STATE_VOLUME}"
|
|
echo ""
|
|
echo "You may also want to remove this node from your Tailscale admin console." |