summaryrefslogtreecommitdiffstats
path: root/sysinfo
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2024-10-14 21:38:28 +0200
committerFlorian Pritz <bluewind@xinu.at>2024-10-14 21:54:03 +0200
commit37ef1a9137a981652355788528d215ff29f98e7f (patch)
tree953d62d276e73128364a7d82877a5ecd89ff47b4 /sysinfo
parenteb80d77842a5a2acd5d1c56c910742d771dbb3ca (diff)
downloadbin-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-xsysinfo8
1 files changed, 6 insertions, 2 deletions
diff --git a/sysinfo b/sysinfo
index ea285d7..6be8e33 100755
--- a/sysinfo
+++ b/sysinfo
@@ -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)% *}"