Remove redundant cleanup steps from update scripts (#9359)

This commit is contained in:
CanbiZ
2025-11-22 16:41:22 +01:00
committed by GitHub
parent fae0552c04
commit 9777abe56d
57 changed files with 180 additions and 387 deletions

View File

@@ -47,18 +47,15 @@ function update_script() {
rm -rf /opt/zigbee2mqtt/data
mv /opt/z2m_backup/data /opt/zigbee2mqtt
cd /opt/zigbee2mqtt
grep -q "^packageImportMethod" ./pnpm-workspace.yaml || echo "packageImportMethod: hardlink" >> ./pnpm-workspace.yaml
grep -q "^packageImportMethod" ./pnpm-workspace.yaml || echo "packageImportMethod: hardlink" >>./pnpm-workspace.yaml
$STD pnpm install --frozen-lockfile
$STD pnpm build
rm -rf /opt/z2m_backup
msg_ok "Updated Zigbee2MQTT"
msg_info "Starting Service"
systemctl start zigbee2mqtt
msg_ok "Started Service"
msg_info "Cleaning up"
rm -rf /opt/z2m_backup
msg_ok "Cleaned up"
msg_ok "Updated successfully!"
fi
exit