Add 24 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 14s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 14s
This commit is contained in:
14
tailscale-relay/logs.sh
Executable file
14
tailscale-relay/logs.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC1091
|
||||
source "${AGENT_PATH}/common.sh"
|
||||
_check_required_env_vars "CONTAINER_NAME"
|
||||
|
||||
if ! lxc info "${CONTAINER_NAME}" &>/dev/null; then
|
||||
_die "Container ${CONTAINER_NAME} does not exist."
|
||||
fi
|
||||
|
||||
if ! lxc info "${CONTAINER_NAME}" 2>/dev/null | grep -q "Status: RUNNING"; then
|
||||
_die "Container ${CONTAINER_NAME} is not running."
|
||||
fi
|
||||
|
||||
lxc exec "${CONTAINER_NAME}" -- journalctl -u tailscaled --no-pager -n 100 "$@"
|
||||
Reference in New Issue
Block a user