
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 35s
26 lines
733 B
Bash
Executable File
26 lines
733 B
Bash
Executable File
#!/bin/bash
|
|
# shellcheck disable=SC1091
|
|
source "${AGENT_PATH}/common.sh"
|
|
_check_required_env_vars "CONTAINER_NAME"
|
|
|
|
# Tailscale Stop Script
|
|
|
|
echo "Stopping Tailscale container..."
|
|
|
|
if _is_container_running "$CONTAINER_NAME"; then
|
|
# Gracefully disconnect from Tailscale network before stopping
|
|
echo "Disconnecting from Tailscale network..."
|
|
docker exec ${CONTAINER_NAME} tailscale down 2>/dev/null || true
|
|
|
|
# Give it a moment to cleanly disconnect
|
|
sleep 2
|
|
|
|
# Stop the container
|
|
if _stop_container "$CONTAINER_NAME"; then
|
|
echo "Tailscale container stopped successfully."
|
|
else
|
|
_die "Failed to stop Tailscale container"
|
|
fi
|
|
else
|
|
echo "Tailscale container is not running."
|
|
fi |