Last active
September 25, 2017 09:50
-
-
Save pysysops/d813a3f86149c63456fded6e667fac42 to your computer and use it in GitHub Desktop.
Script to add to /etc/profile.d to show alerts only when logging in via SSH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This script calls a python script to output | |
# current alerts on the current system when SSH'd | |
# in. | |
if [ "$SSH_TTY" ] | |
then | |
python /etc/profile.d/show_alerts.py | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A handy script to run at login. See: https://gist.github.com/pysysops/a39809f8da4a1c605ab31d834a00d1cf

Gives output below MOTD: