Add tailscale!
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 35s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 35s
This commit is contained in:
26
tailscale/stop.sh
Executable file
26
tailscale/stop.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/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
|
Reference in New Issue
Block a user