ソースを参照

add npm check to install gamedig

Daniel Gibbs 2 年 前
コミット
4ca617c3a6
1 ファイル変更3 行追加1 行削除
  1. 3 1
      lgsm/modules/check_gamedig.sh

+ 3 - 1
lgsm/modules/check_gamedig.sh

@@ -5,11 +5,13 @@
 # Website: https://linuxgsm.com
 # Description: Installs nodejs and gamedig
 
-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
+if [ "$(command -v node)" ] && [ "$(command -v npm)" ] && [ "$(node -v | cut -d 'v' -f 2 | cut -d '.' -f 1)" -ge 16 ] && [ ! -f "${lgsmdir}/node_modules/gamedig/bin/gamedig.js" ]; then
 	echo -e ""
 	echo -e "${bold}${lightyellow}Installing Gamedig${default}"
 	fn_script_log_info "Installing Gamedig"
 	cd "${lgsmdir}" || exit
 	wget -N --no-check-certificate "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${githubbranch}/package.json"
 	npm install
+else
+	fn_script_log_info "Install NodeJS and NPM to enable Gamedig"
 fi