mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-02 18:11:36 +00:00
b6186623f0
* Remove `deviceGroupMembership` * Fix controller.ts * Remove `legacy_api` logic from non-legacy extensions. * Fix network map coverage. * Remove all `legacy` extensions. * Remove `legacy_availability_payload`, `legacy_api`. Remove legacy from configure. * Fix prettier. * Remove some leftovers * Renamed `updateAvailable` to `update_available` * Remove emitPublishAvailability * Remove `configuration.yaml` * Switch to pnpm * Remove direct mqtt-packet dependency. * fix pretty * fix `getDependencyVersion` * fix pnpm publish * fix(ignore): fix pnpm publish * Remove deprecated bridge `config/*` * Improve update script * Improve update.sh --------- Co-authored-by: Nerivec <62446222+Nerivec@users.noreply.github.com>
32 lines
634 B
Bash
Executable File
32 lines
634 B
Bash
Executable File
#!/bin/bash -e
|
|
cd "$(dirname "$0")"
|
|
|
|
NEED_RESTART=0
|
|
|
|
if which systemctl 2> /dev/null > /dev/null; then
|
|
echo "Checking Zigbee2MQTT status..."
|
|
if systemctl is-active --quiet zigbee2mqtt; then
|
|
echo "Stopping Zigbee2MQTT..."
|
|
sudo systemctl stop zigbee2mqtt
|
|
NEED_RESTART=1
|
|
fi
|
|
else
|
|
echo "Skipped stopping Zigbee2MQTT, no systemctl found"
|
|
fi
|
|
|
|
echo "Updating..."
|
|
git pull --no-rebase
|
|
|
|
echo "Installing dependencies..."
|
|
pnpm i --frozen-lockfile
|
|
|
|
echo "Building..."
|
|
pnpm run build
|
|
|
|
if [ $NEED_RESTART -eq 1 ]; then
|
|
echo "Starting Zigbee2MQTT..."
|
|
sudo systemctl start zigbee2mqtt
|
|
fi
|
|
|
|
echo "Done!"
|