Add tailscale!
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 35s

This commit is contained in:
Your Name
2025-09-07 22:52:10 +12:00
parent 8e6b00bfee
commit 9aa6168f76
12 changed files with 487 additions and 0 deletions

26
tailscale/logs.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# shellcheck disable=SC1091
source "${AGENT_PATH}/common.sh"
_check_required_env_vars "CONTAINER_NAME"
# Tailscale Logs Script
# Optional: follow logs with -f flag
FOLLOW=""
if [ "$1" = "-f" ] || [ "$1" = "--follow" ]; then
FOLLOW="-f"
fi
if ! _is_container_exists "$CONTAINER_NAME"; then
echo "Error: Tailscale container does not exist."
exit 1
fi
echo "Fetching logs from Tailscale container..."
echo "========================================="
docker logs ${FOLLOW} ${CONTAINER_NAME} 2>&1
if [ -z "$FOLLOW" ]; then
echo ""
echo "Tip: Use '${SERVICE_PATH}/logs.sh -f' to follow logs in real-time."
fi