Fixed SSH MOTD issues on macOS.
This commit is contained in:
parent
2375365ecd
commit
4c472a5310
1 changed files with 66 additions and 60 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue