diff --git a/home.admin/config.scripts/bonus.bos.sh b/home.admin/config.scripts/bonus.bos.sh index 3bdd3d39d..5c91acfb7 100644 --- a/home.admin/config.scripts/bonus.bos.sh +++ b/home.admin/config.scripts/bonus.bos.sh @@ -61,6 +61,10 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then # check latest version: # https://github.com/alexbosworth/balanceofsatoshis/blob/master/package.json#L70 sudo -u bos npm install -g balanceofsatoshis@5.41.0 + if ! [ $? -eq 0 ]; then + echo "FAIL - npm install did not run correctly, aborting" + exit 1 + fi # setting value in raspi blitz config sudo sed -i "s/^bos=.*/bos=on/g" /mnt/hdd/raspiblitz.conf diff --git a/home.admin/config.scripts/bonus.btc-rpc-explorer.sh b/home.admin/config.scripts/bonus.btc-rpc-explorer.sh index 8960074f4..d2e2644b1 100644 --- a/home.admin/config.scripts/bonus.btc-rpc-explorer.sh +++ b/home.admin/config.scripts/bonus.btc-rpc-explorer.sh @@ -119,6 +119,10 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then cd btc-rpc-explorer sudo -u btcrpcexplorer git reset --hard v2.0.0 sudo -u btcrpcexplorer npm install + if ! [ $? -eq 0 ]; then + echo "FAIL - npm install did not run correctly, aborting" + exit 1 + fi # prepare .env file echo "# getting RPC credentials from the ${network}.conf" diff --git a/home.admin/config.scripts/bonus.kindle-display.sh b/home.admin/config.scripts/bonus.kindle-display.sh index ea2c3dbb5..592b78cbb 100755 --- a/home.admin/config.scripts/bonus.kindle-display.sh +++ b/home.admin/config.scripts/bonus.kindle-display.sh @@ -46,6 +46,10 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then sudo -u $USERNAME rm v$APP_VERSION.tar.gz cd kindle-display/server sudo -u $USERNAME npm install + if ! [ $? -eq 0 ]; then + echo "FAIL - npm install did not run correctly, aborting" + exit 1 + fi # setup kindle-display config RPC_USER=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcuser | cut -c 9-) diff --git a/home.admin/config.scripts/bonus.rtl.sh b/home.admin/config.scripts/bonus.rtl.sh index fa4b73b9b..fc1da26ff 100755 --- a/home.admin/config.scripts/bonus.rtl.sh +++ b/home.admin/config.scripts/bonus.rtl.sh @@ -104,17 +104,15 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then echo "*** Run: npm install ***" export NG_CLI_ANALYTICS=false sudo -u rtl npm install --only=prod + if ! [ $? -eq 0 ]; then + echo "FAIL - npm install did not run correctly, aborting" + exit 1 + else + echo "OK - RTL install looks good" + echo "" + fi cd .. - # check if node_modules exist now - if [ -d "/home/rtl/RTL/node_modules" ]; then - echo "OK - RTL install looks good" - else - echo "FAIL - npm install did not run correctly" - echo "ABORT - RTL install" - exit 1 - fi - echo "" # prepare RTL-Config.json file echo "*** RTL.conf ***" diff --git a/home.admin/config.scripts/bonus.stacking-sats-kraken.sh b/home.admin/config.scripts/bonus.stacking-sats-kraken.sh index a18ff9bdb..2a212f9d0 100755 --- a/home.admin/config.scripts/bonus.stacking-sats-kraken.sh +++ b/home.admin/config.scripts/bonus.stacking-sats-kraken.sh @@ -38,6 +38,10 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then sudo -u $USERNAME rm v$SCRIPT_VERSION.tar.gz cd stacking-sats-kraken sudo -u $USERNAME npm install + if ! [ $? -eq 0 ]; then + echo "FAIL - npm install did not run correctly, aborting" + exit 1 + fi # setup stacking config sudo mkdir -p $APP_DATA_DIR diff --git a/home.admin/config.scripts/bonus.thunderhub.sh b/home.admin/config.scripts/bonus.thunderhub.sh index aefeecc3c..c0b1e022b 100644 --- a/home.admin/config.scripts/bonus.thunderhub.sh +++ b/home.admin/config.scripts/bonus.thunderhub.sh @@ -84,6 +84,11 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then sudo -u thunderhub git reset --hard v0.8.12 echo "Running npm install and run build..." sudo -u thunderhub npm install + if ! [ $? -eq 0 ]; then + echo "FAIL - npm install did not run correctly, aborting" + exit 1 + fi + sudo -u thunderhub npm run build ############### @@ -293,6 +298,10 @@ if [ "$1" = "update" ]; then # install deps echo "Installing dependencies..." sudo -u thunderhub npm install --quiet + if ! [ $? -eq 0 ]; then + echo "FAIL - npm install did not run correctly, aborting" + exit 1 + fi # build nextjs echo "Building application..."