From 8b1ef0e24bd0b9abfe0d49992a51ebe391562d0f Mon Sep 17 00:00:00 2001 From: Carsten Mogge Date: Wed, 24 Jan 2024 23:30:44 +0100 Subject: [PATCH] Update nodejs-apps.bash test with apt-get install nodejs Signed-off-by: Carsten Mogge --- functions/nodejs-apps.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions/nodejs-apps.bash b/functions/nodejs-apps.bash index ee8ad5ad3..450cf9242 100644 --- a/functions/nodejs-apps.bash +++ b/functions/nodejs-apps.bash @@ -271,6 +271,8 @@ zigbee2mqtt_setup() { if ! (whiptail --title "Zigbee2MQTT installation" --yes-button "Continue" --no-button "Cancel" --yesno "$z2mInstalledText" 14 80); then echo "CANCELED"; return 0; fi fi + command -v npm >/dev/null 2>&1 || apt-get install nodejs; + if ! cond_redirect fix_permissions /opt/zigbee2mqtt "${username:-openhabian}:openhab" 644 755; then echo "FAILED (zigbee2mqtt set permissions)"; return 1; fi if ! cond_redirect fix_permissions /var/log/zigbee2mqtt "${username:-openhabian}:openhab" 644 755; then echo "FAILED (zigbee2mqtt set permissions)"; return 1; fi