diff --git a/update-motd b/update-motd index a3fbc25..b57579c 100755 --- a/update-motd +++ b/update-motd @@ -1,9 +1,8 @@ #!/bin/bash #Script to update motd with relevant information. - #Define output file motd="/etc/motd" - + # Collect information # $USER is automatically defined HOSTNAME=`uname -n` @@ -15,24 +14,23 @@ CPU_TEMP=$(($( $motd - + echo -e " $A. $X $A/#\ $X _ $A _ _ $A/###\ $X __ _ _ __ ___| |__ $A| (_)_ __ _ ___ __ $A/#####\ $X / _' | '__/ __| '_ \ $A| | | '_ \| | | \ \/ / - $A/##.-.##\ $X | (_| | | | (__| | | |$A| | | | | | |_| |> < + $A/##.-.##\ $X | (_| | | | (__| | | |$A| | | | | | |_| |> < $A/##( )##\ $X \__,_|_| \___|_| |_|$A|_|_|_| |_|\__,_/_/\_\\ $A/#.-- --.#\ $X $A/' '\ $B " >> $motd - + echo -e "$R===============================================================" >> $motd echo -e " $R KERNEL $W= $KERNEL (installed: $INSTALLED_KERNEL) " >> $motd echo -e " $R CPU $W= $CPU " >> $motd @@ -63,7 +61,7 @@ echo -e " $R USERS $W= Currently `users | wc -w` users logged on " >> $mot echo -e "$R===============================================================" >> $motd echo -e " $R CPU Usage $W= $LOAD1 1 min $LOAD5 5 min $LOAD15 15 min " >> $motd echo -e " $R CPU Temperature $W= $CPU_TEMP" >> $motd -echo -e " $R Memory Used $W= $MEMORY1 / $MEMORY2 " >> $motd +echo -e " $R Memory Used $W= $MEMORY " >> $motd echo -e " $R Swap in use $W= `free -m | tail -n 1 | awk '{print $3}'` MB " >> $motd echo -e " $R Processes $W= You are running $PSU of $PSA processes " >> $motd echo -e " $R System Uptime $W= $upDays days $upHours hours $upMins minutes $upSecs seconds " >> $motd