Skip to content

Commit eb5e0b2

Browse files
committed
Update nodejs-apps.bash
Signed-off-by: Carsten Mogge <carsten.mogge@gmail.com>
1 parent 232121c commit eb5e0b2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

functions/nodejs-apps.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,10 @@ EOF
310310
cd /opt/zigbee2mqtt || (echo "FAILED (cd)"; return 1)
311311
cond_redirect sudo -u "${username:-openhabian}" pnpm install --frozen-lockfile --ignore-scripts=false
312312

313-
if systemctl >/dev/null 2>&1; then
313+
if [ "$(basename "$(ps -o comm= 1)")" = "systemd" ]; then
314314
systemctl daemon-reload
315+
systemctl enable --now zigbee2mqtt.service
315316
fi
316-
systemctl enable --now zigbee2mqtt.service
317317

318318
[[ -n $INTERACTIVE ]] && whiptail --title "Operation successful" --msgbox "$installSuccessText" 15 80
319319
}

0 commit comments

Comments
 (0)