Created
January 24, 2019 22:46
-
-
Save Landrash/b761bf5f51d566d799d45dc3fe7352bc to your computer and use it in GitHub Desktop.
zigbee2mqtt update script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
echo "Stopping zigbee2mqttdev..." | |
sudo systemctl stop zigbee2mqttdev | |
echo "Creating backup of configuration..." | |
cp -R data data-backup | |
echo "Updating..." | |
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 zigbee2mqttdev..." | |
sudo systemctl start zigbee2mqttdev | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment