Fix Zigbee2MQTT BreakingChange to Version 2.0.0

This commit is contained in:
CanbiZ 2025-01-04 09:29:32 +01:00 committed by GitHub
parent 536de5d083
commit 56febab22e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,15 +14,16 @@ network_check
update_os update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y curl $STD apt-get install -y \
$STD apt-get install -y sudo curl \
$STD apt-get install -y mc sudo \
$STD apt-get install -y git mc \
$STD apt-get install -y make git \
$STD apt-get install -y g++ make \
$STD apt-get install -y gcc g++ \
$STD apt-get install -y ca-certificates gcc \
$STD apt-get install -y gnupg ca-certificates \
gnupg
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Setting up Node.js Repository" msg_info "Setting up Node.js Repository"
@ -34,6 +35,7 @@ msg_ok "Set up Node.js Repository"
msg_info "Installing Node.js" msg_info "Installing Node.js"
$STD apt-get update $STD apt-get update
$STD apt-get install -y nodejs $STD apt-get install -y nodejs
$STD apt-get install -y pnpm
msg_ok "Installed Node.js" msg_ok "Installed Node.js"
msg_info "Setting up Zigbee2MQTT Repository" msg_info "Setting up Zigbee2MQTT Repository"
@ -42,7 +44,7 @@ msg_ok "Set up Zigbee2MQTT Repository"
msg_info "Installing Zigbee2MQTT" msg_info "Installing Zigbee2MQTT"
cd /opt/zigbee2mqtt cd /opt/zigbee2mqtt
$STD npm ci $STD pnpm ci
msg_ok "Installed Zigbee2MQTT" msg_ok "Installed Zigbee2MQTT"
msg_info "Creating Service" msg_info "Creating Service"
@ -52,7 +54,7 @@ Description=zigbee2mqtt
After=network.target After=network.target
[Service] [Service]
Environment=NODE_ENV=production Environment=NODE_ENV=production
ExecStart=/usr/bin/npm start ExecStart=/usr/bin/pnpm start
WorkingDirectory=/opt/zigbee2mqtt WorkingDirectory=/opt/zigbee2mqtt
StandardOutput=inherit StandardOutput=inherit
StandardError=inherit StandardError=inherit
@ -60,7 +62,7 @@ Restart=always
User=root User=root
[Install] [Install]
WantedBy=multi-user.target" >$service_path WantedBy=multi-user.target" >$service_path
$STD systemctl enable zigbee2mqtt.service systemctl enable -q --now zigbee2mqtt.service
msg_ok "Created Service" msg_ok "Created Service"
motd_ssh motd_ssh