mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 10:28:33 -07:00
e54de4bea7
* Adding update script Fix #389 * Update update.sh :) * Make executable & update update.sh
25 lines
439 B
Bash
Executable File
25 lines
439 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
echo "Stopping zigbee2mqtt..."
|
|
sudo systemctl stop zigbee2mqtt
|
|
|
|
echo "Creating backup of configuration..."
|
|
cp -R data data-backup
|
|
|
|
echo "Updating..."
|
|
git checkout HEAD -- npm-shrinkwrap.json
|
|
git pull
|
|
|
|
echo "Installing dependencies..."
|
|
rm -rf node_modules
|
|
npm install
|
|
|
|
echo "Restore configuration..."
|
|
cp -R data-backup/* data
|
|
rm -rf data-backup
|
|
|
|
echo "Starting zigbee2mqtt..."
|
|
sudo systemctl start zigbee2mqtt
|
|
|
|
echo "Done!"
|