Skip to content

Commit

Permalink
scripts: Add convenience script to disable wall messages from syslog.
Browse files Browse the repository at this point in the history
If the server is being used as a syslog server, then it is prone to
receiving emergency messages from the outside that can trigger wall
messages to go to all the system terminals. This won't impact BBS
nodes at all, but can be bothersome to the sysop. Add a script to
disable this, for convenience.
  • Loading branch information
InterLinked1 committed Feb 19, 2024
1 parent a1725e4 commit bbb2803
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scripts/disablewall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

# Disable broadcast wall messages from syslog to avoid interfering with terminal sessions
# Won't affect BBS nodes either way, but could be annoying to the sysop if not done
# Recommended if syslog is enabled on this server

# Test before
logger -p local0.emerg "This is a test, not a real emergency"

# Disable default emergency rule: *.emerg :omusrmsg:*
sed -e '/*.emerg/ s/^#*/#/' -i /etc/rsyslog.conf

# Disable forwarding to wall for journald
sed -i 's/#ForwardToWall=yes/ForwardToWall=no/' /etc/systemd/journald.conf

# Reload
systemctl force-reload systemd-journald
systemctl restart rsyslog

# Test again: this should no longer generate a broadcast
logger -p local0.emerg "This is a test, not a real emergency"

0 comments on commit bbb2803

Please sign in to comment.