diff options
author | Florian Pritz <bluewind@xinu.at> | 2024-10-14 21:38:28 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2024-10-14 21:54:03 +0200 |
commit | 37ef1a9137a981652355788528d215ff29f98e7f (patch) | |
tree | 953d62d276e73128364a7d82877a5ecd89ff47b4 /sysinfo | |
parent | eb80d77842a5a2acd5d1c56c910742d771dbb3ca (diff) | |
download | bin-37ef1a9137a981652355788528d215ff29f98e7f.tar.gz bin-37ef1a9137a981652355788528d215ff29f98e7f.tar.xz |
sysinfo: Skip motd if it does not exist
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'sysinfo')
-rwxr-xr-x | sysinfo | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3,8 +3,12 @@ BLUE="\e[1;34m" NC="\e[0m" clear -cat /etc/motd -echo + +if [[ -e /etc/motd ]]; then + cat /etc/motd + echo +fi + echo -e "${BLUE}Host:${NC} $HOST" echo -e "${BLUE}Uptime:$NC ${${$(uptime)%%,*}##*up }, ${$(</proc/loadavg)% *}" |