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:
51
squashdisplay/start.sh
Executable file
51
squashdisplay/start.sh
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC1091
|
||||
source "${AGENT_PATH}/common.sh"
|
||||
_check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG"
|
||||
|
||||
echo "Starting Squash Display setup container..."
|
||||
|
||||
# Build the docker run command - needs privileged access to configure host
|
||||
DOCKER_RUN_CMD="docker run -d \
|
||||
--restart no \
|
||||
--name ${CONTAINER_NAME} \
|
||||
--privileged \
|
||||
--pid=host \
|
||||
--network=host \
|
||||
-v /:/host \
|
||||
-v ${SERVICE_PATH}/scripts:/scripts:ro \
|
||||
-e KIOSK_URL=\"${KIOSK_URL}\" \
|
||||
-e KIOSK_USER=\"${KIOSK_USER}\" \
|
||||
-e DISPLAY_WIDTH=\"${DISPLAY_WIDTH}\" \
|
||||
-e DISPLAY_HEIGHT=\"${DISPLAY_HEIGHT}\" \
|
||||
-e DISPLAY_REFRESH=\"${DISPLAY_REFRESH}\" \
|
||||
-e GPU_MEM=\"${GPU_MEM}\" \
|
||||
-e ENABLE_WATCHDOG=\"${ENABLE_WATCHDOG}\" \
|
||||
-e ENABLE_AUTO_LOGIN=\"${ENABLE_AUTO_LOGIN}\" \
|
||||
-e ENABLE_HDMI_KEEP_ALIVE=\"${ENABLE_HDMI_KEEP_ALIVE}\" \
|
||||
${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG} \
|
||||
sh /scripts/setup-host.sh"
|
||||
|
||||
# Create and start the container
|
||||
if ! _create_and_start_container "$DOCKER_RUN_CMD" "$CONTAINER_NAME"; then
|
||||
_die "Failed to start Squash Display setup container"
|
||||
fi
|
||||
|
||||
# Wait for setup to complete
|
||||
echo "Running kiosk setup..."
|
||||
echo "This may take a few minutes as packages are installed..."
|
||||
|
||||
# Follow the container logs until it exits
|
||||
docker logs -f ${CONTAINER_NAME} 2>&1
|
||||
|
||||
# Check if setup completed successfully
|
||||
EXIT_CODE=$(docker inspect ${CONTAINER_NAME} --format='{{.State.ExitCode}}')
|
||||
if [ "$EXIT_CODE" != "0" ]; then
|
||||
echo "Setup failed with exit code: $EXIT_CODE"
|
||||
echo "Check logs for details: docker logs ${CONTAINER_NAME}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Squash Display setup completed successfully!"
|
||||
echo "Container: ${CONTAINER_NAME}"
|
Reference in New Issue
Block a user