script-install-motd.bk 465 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. # Install motd scripts
  3. [[ -f functions ]] && . functions || exit 1
  4. is_root
  5. scripts=("10-hostname-color" "20-sysinfo" "35-diskspace" "36-diskstatus" "40-services" "50-fail2ban")
  6. git clone "https://github.com/yboetz/motd.git"
  7. systemdir="/etc/update-mot.d"
  8. [[ ! -d "$systemdir" ]] && mkdir -p "$systemdir"
  9. cd motd || exit $?
  10. for script in "${scripts[@]}"; do
  11. echo "$script"
  12. cp "$script" "$systemdir"
  13. done
  14. cd ..
  15. rm -rf motd
  16. exit 0