Update zigbee2mqtt.sh

This commit is contained in:
CanbiZ 2025-07-02 09:39:57 +02:00
parent 7ed5202226
commit c3b675ad7f

View File

@ -39,6 +39,10 @@ function update_script() {
RELEASE=$(curl -fsSL https://api.github.com/repos/Koenkk/zigbee2mqtt/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') RELEASE=$(curl -fsSL https://api.github.com/repos/Koenkk/zigbee2mqtt/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if [[ "$RELEASE" != "$CURRENT" ]]; then if [[ "$RELEASE" != "$CURRENT" ]]; then
if ! command -v jq &>/dev/null; then
$STD apt-get update
$STD apt-get install -y jq
fi
NODE_VERSION=24 NODE_MODULE="pnpm@$(curl -fsSL https://raw.githubusercontent.com/Koenkk/zigbee2mqtt/master/package.json | jq -r '.packageManager | split("@")[1]')" setup_nodejs NODE_VERSION=24 NODE_MODULE="pnpm@$(curl -fsSL https://raw.githubusercontent.com/Koenkk/zigbee2mqtt/master/package.json | jq -r '.packageManager | split("@")[1]')" setup_nodejs
msg_info "Stopping Service" msg_info "Stopping Service"