8000 Limit log size and add pre-logon message by crschardt · Pull Request #40 · PhotonVision/photon-image-modifier · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Limit log size and add pre-logon message #40

8000 New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions files/issue.txt
Original file line number Diff line number Diff line change
@@ -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/
################## ::::::
##############
#########

19 changes: 19 additions & 0 deletions install_common.sh
Original file line number Diff line number Diff line change
@@ -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 <<EOF
# Added by Photonvision to keep the logs to a reasonable size
[Journal]
SystemMaxUse=100M
EOF

# Add a helpful message to the logon screen
# ASCII Art generated by: https://www.asciiart.eu/image-to-ascii
cp -f ./files/issue.txt /etc/issue
cp -f /etc/issue /etc/issue.net
sed -i 's/#Banner none/Banner \/etc\/issue.net/g' /etc/ssh/sshd_config
Loading
0