Add link to manual in motd
This commit is contained in:
@@ -5,6 +5,12 @@
|
||||
# Don't run this script directly
|
||||
[[ "${BASH_SOURCE[0]}" == "${0}" ]] && exit 0
|
||||
|
||||
|
||||
### VARS ###
|
||||
export INSTALL_DIR=/usr/local/bin
|
||||
|
||||
|
||||
### FUNCTIONS ###
|
||||
prompt() { read -r -p "Enter $1: " "$1"; }
|
||||
|
||||
ask_ok() {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user