Skip to content

Commit

Permalink
Fix broken code in Node-RED install
Browse files Browse the repository at this point in the history
There was a minor error in the code for Node-RED installation
following openhab#938. This corrects that error.

Signed-off-by: Ethan Dye <mrtops03@gmail.com>
  • Loading branch information
ecdye committed Jul 8, 2020
1 parent 8c9d3e0 commit 48cc456
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/nodejs-apps.bash
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ nodered_setup() {

local temp

if ! dpkg -s 'build-essential' > /dev/null 2>&1; then
if ! dpkg -s 'build-essential' &> /dev/null; then
echo -n "$(timestamp) [openHABian] Installing Node-RED required packages (build-essential)... "
if cond_redirect apt-get install --yes build-essential; then echo "OK"; else echo "FAILED"; return 1; fi
fi
Expand All @@ -101,7 +101,7 @@ nodered_setup() {
if ! cond_redirect npm install -g node-red-contrib-bigtimer; then echo "FAILED (install bigtimer addon)"; return 1; fi
if ! cond_redirect npm update -g node-red-contrib-bigtimer; then echo "FAILED (update bigtimer addon)"; return 1; fi
if ! cond_redirect npm install -g node-red-contrib-openhab2; then echo "FAILED (install openhab2 addon)"; return 1; fi
if cond_redirect npm update -g node-red-contrib-bigtimer; then echo "OK"; else echo "FAILED (update bigtimer addon)"; return 1; fi
if cond_redirect npm update -g node-red-contrib-openhab2; then echo "OK"; else echo "FAILED (update openhab2 addon)"; return 1; fi

echo -n "$(timestamp) [openHABian] Setting up Node-RED service... "
if ! cond_redirect systemctl enable nodered.service; then echo "FAILED (enable service)"; return 1; fi
Expand Down

0 comments on commit 48cc456

Please sign in to comment.