Add link to manual in motd

This commit is contained in:
2024-06-30 20:35:24 -04:00
parent c67d1f0c47
commit 39f7433737
2 changed files with 12 additions and 5 deletions

View File

@@ -9,17 +9,17 @@ parent=${parent%/*}
is_root
[[ "$#" -gt 0 ]] && DEBUG=on
DEBUG=0
[[ "$#" -gt 0 ]] && echo "Debug on" && DEBUG=1
installdir="/usr/local/bin/"
installdir="/usr/local/bin"
[[ ! -d "$installdir" ]] && mkdir -p "$installdir"
[[ -d "$installdir" ]] || mkdir -p "$installdir"
if [[ -v DEBUG ]]; then
if (( DEBUG )); then
script="generate-motd.sh"
else
script="$installdir/generate-motd.sh"
[[ -f ./functions ]] && cp -f functions "$installdir"
fi
cat <<- 'EOF' > "$script"
@@ -61,6 +61,7 @@ $W Load........: $G$LOAD1$W (1m), $G$LOAD5$W (5m), $G$LOAD15$W (15m)
$W Processes...:$W $G$PROCESS_ROOT$W (root), $G$PROCESS_USER$W (user), $G$PROCESS_ALL$W (total)
$W CPU.........: $W$PROCESSOR_NAME ($G$PROCESSOR_COUNT$W vCPU)
$W Memory......: $G$USED$W used, $G$AVAIL$W avail, $G$TOTAL$W total$W"
$W Manual......: https://docs.google.com/document/d/1K_KwAlv8Zljmy-enwmhT6gMTFutlAFglixvpLGBx0VY"
EOF
# Disk usage