Update zigbee2mqtt-install.sh

This commit is contained in:
CanbiZ 2025-01-04 10:29:26 +01:00 committed by GitHub
parent 50e273ca3c
commit c348fb2fa9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,6 +18,7 @@ $STD apt-get install -y \
curl \
sudo \
mc \
git \
make \
g++ \
gcc \
@ -42,7 +43,7 @@ msg_ok "Installed pnpm"
msg_info "Setting up Zigbee2MQTT"
cd /opt
corepack enable
$STD corepack enable
RELEASE=$(curl -s https://api.github.com/repos/Koenkk/zigbee2mqtt/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
wget -q "https://github.com/Koenkk/zigbee2mqtt/archive/refs/tags/${RELEASE}.zip"
unzip -q ${RELEASE}.zip
@ -50,7 +51,7 @@ mv zigbee2mqtt-${RELEASE} /opt/zigbee2mqtt
cd /opt/zigbee2mqtt/data
mv configuration.example.yaml configuration.yaml
cd /opt/zigbee2mqtt
pnpm install
$STD pnpm install
msg_ok "Installed Zigbee2MQTT"
msg_info "Creating Service"