From 2a51d9caa3f1e6c33c4b481d40cfcd158012565d Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 5 Jan 2025 04:50:11 -0800 Subject: [PATCH] New & improved Disable MOTD advertisements Checks if /etc/default/motd-news exists before running commands to support installs that don't have motd-news-config installed. --- setup/system.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/system.sh b/setup/system.sh index dd366401..fce3091f 100755 --- a/setup/system.sh +++ b/setup/system.sh @@ -87,8 +87,10 @@ tools/editconf.py /etc/systemd/journald.conf MaxRetentionSec=10day # Disable MOTD adverts to prevent revealing server information in MOTD request headers # See https://ma.ttias.be/what-exactly-being-sent-ubuntu-motd/ +if [ -f /etc/default/motd-news ]; then tools/editconf.py /etc/default/motd-news ENABLED=0 rm -f /var/cache/motd-news +fi # ### Add PPAs.