Fixed SSH MOTD issues on macOS.

This commit is contained in:
Brian Zalewski 2023-06-15 00:19:17 +00:00
parent 2375365ecd
commit 4c472a5310

View file

@ -280,6 +280,8 @@ print_banner() {
}
print_processor() {
if [ ! -d /Applications ] && [ ! -d /System ]; then
# System is not macOS
printf "\\n"
printf " \\033[1;37mProcessor:\\033[0m\\n"
@ -337,9 +339,12 @@ print_processor() {
printf " %s \\033[%dm%s\\033[0m\\n" "$PROCESSOR_LOADAVG_ICON" "$processor_loadavg_color" "$processor_loadavg"
printf " %s %s%s = %s Cores%s\\n" "$PROCESSOR_MODEL_ICON" "$processor_count" "$processor_model" "$processor_cores" "$processor_threads"
fi
}
print_memory() {
if [ ! -d /Applications ] && [ ! -d /System ]; then
# System is not macOS
printf "\\n"
printf " \\033[1;37mMemory:\\033[0m\\n"
@ -349,6 +354,7 @@ print_memory() {
memory_cached=$(echo "$memory_usage" | awk '{ print $6 }')
generate_bar_memory "$MEMORY_ICON" "$memory_total" "$memory_used" "$memory_cached"
fi
}
print_swap() {