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

@@ -5,6 +5,12 @@
# Don't run this script directly # Don't run this script directly
[[ "${BASH_SOURCE[0]}" == "${0}" ]] && exit 0 [[ "${BASH_SOURCE[0]}" == "${0}" ]] && exit 0
### VARS ###
export INSTALL_DIR=/usr/local/bin
### FUNCTIONS ###
prompt() { read -r -p "Enter $1: " "$1"; } prompt() { read -r -p "Enter $1: " "$1"; }
ask_ok() { ask_ok() {

View File

@@ -9,17 +9,17 @@ parent=${parent%/*}
is_root 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" script="generate-motd.sh"
else else
script="$installdir/generate-motd.sh" script="$installdir/generate-motd.sh"
[[ -f ./functions ]] && cp -f functions "$installdir"
fi fi
cat <<- 'EOF' > "$script" 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 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 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 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 EOF
# Disk usage # Disk usage