check_gamedig.sh 628 B

123456789101112131415
  1. #!/bin/bash
  2. # LinuxGSM check_gamedig.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: http://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Installs nodejs and gamedig
  7. if [ "$(command -v node)" ] && [ "$(node -v | cut -d 'v' -f 2 | cut -d '.' -f 1)" -ge 16 ] && [ ! -f "${lgsmdir}/node_modules/gamedig/bin/gamedig.js" ]; then
  8. echo -e ""
  9. echo -e "${bold}${lightyellow}Installing Gamedig${default}"
  10. fn_script_log_info "Installing Gamedig"
  11. cd "${lgsmdir}" || exit
  12. wget -N --no-check-certificate "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${githubbranch}/package.json"
  13. npm install
  14. fi