mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-01 23:57:05 +00:00
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.
This commit is contained in:
parent
da45a0d04a
commit
2a51d9caa3
@ -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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user