From 52ffb3d87a9a67cd523dfa69b4a1c0aaa9b04ca7 Mon Sep 17 00:00:00 2001 From: Craig Schardt Date: Mon, 23 Dec 2024 22:55:20 -0600 Subject: [PATCH] Limit log size and add pre-logon message (#40) Fixes #35 and #12 --- .github/workflows/main.yml | 2 ++ files/issue.txt | 19 +++++++++++++++++++ install_common.sh | 19 +++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 files/issue.txt create mode 100755 install_common.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 39dcc2b..b31544c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,6 +67,8 @@ jobs: commands: | chmod +x ${{matrix.script}} ${{ matrix.script }} + chmod +x ./install_common.sh + ./install_common.sh echo "${{ github.ref_name }};${{ matrix.name }}" > /opt/photonvision/image-version - name: Compress built image diff --git a/files/issue.txt b/files/issue.txt new file mode 100644 index 0000000..1ca73e3 --- /dev/null +++ b/files/issue.txt @@ -0,0 +1,19 @@ + + ####### PhotonVision is the free, fast, and + ############# easy-to-use computer vision solution + ################# for the FIRST Robotics Competition. + ###### ###### ::: + ##### ##*:::::::::: To configure PhotonVision, open: + ##### ::::::::::::::::::: + #### ::::::::::: ### http://photonvision.local:5800 + #### #### + #### #### using a computer on the same network + #### :: ### as this device. + #### ::::::: #### + #### :::::::: #### Documentation is available at: + ##### :::::::: : + ###### ####::::::::: https://docs.photonvision.org/ + ################## :::::: + ############## + ######### + \ No newline at end of file diff --git a/install_common.sh b/install_common.sh new file mode 100755 index 0000000..0205e02 --- /dev/null +++ b/install_common.sh @@ -0,0 +1,19 @@ +#!/bin/bash -v + +# Do additional tasks that are common across all images, +# but not suitable for inclusion in install.sh +echo "Running install_common.sh" + +# Limit the maximum length of systemd-journald logs +mkdir -p /etc/systemd/journald.conf.d +cat > /etc/systemd/journald.conf.d/60-limit-log-size.conf <