attempt to add squash stuff. Tailscale works!
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 34s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 34s
This commit is contained in:
54
squashdisplay/logs.sh
Executable file
54
squashdisplay/logs.sh
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC1091
|
||||
source "${AGENT_PATH}/common.sh"
|
||||
_check_required_env_vars "CONTAINER_NAME" "KIOSK_USER"
|
||||
|
||||
# Squash Display Logs Script
|
||||
|
||||
echo "Squash Display Logs"
|
||||
echo "==================="
|
||||
|
||||
# Check if we should follow logs
|
||||
FOLLOW=""
|
||||
if [ "$1" = "-f" ] || [ "$1" = "--follow" ]; then
|
||||
FOLLOW="-f"
|
||||
fi
|
||||
|
||||
# Show setup container logs if it exists
|
||||
if _is_container_exists "$CONTAINER_NAME"; then
|
||||
echo ""
|
||||
echo "Setup Container Logs:"
|
||||
echo "--------------------"
|
||||
docker logs ${FOLLOW} ${CONTAINER_NAME} 2>&1
|
||||
fi
|
||||
|
||||
# Show system logs related to kiosk
|
||||
echo ""
|
||||
echo "System Kiosk Logs:"
|
||||
echo "-----------------"
|
||||
echo "Auto-login service (getty@tty1):"
|
||||
if [ -n "$FOLLOW" ]; then
|
||||
echo "Following logs (Ctrl+C to stop)..."
|
||||
journalctl -u getty@tty1 -f
|
||||
else
|
||||
journalctl -u getty@tty1 -n 50 --no-pager
|
||||
|
||||
echo ""
|
||||
echo "X server logs (if available):"
|
||||
if [ -f "/home/${KIOSK_USER}/.local/share/xorg/Xorg.0.log" ]; then
|
||||
tail -50 /home/${KIOSK_USER}/.local/share/xorg/Xorg.0.log
|
||||
else
|
||||
echo "No X server logs found"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Watchdog logs (if available):"
|
||||
if [ -f "/home/${KIOSK_USER}/watchdog.log" ]; then
|
||||
tail -20 /home/${KIOSK_USER}/watchdog.log
|
||||
else
|
||||
echo "No watchdog logs found"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Tip: Use './logs.sh -f' to follow logs in real-time"
|
||||
fi
|
Reference in New Issue
Block a user