Created
December 4, 2017 06:00
-
-
Save hannesbe/ecec6b15aa89c9d8e53c496bd3be3fb2 to your computer and use it in GitHub Desktop.
Upgrade Home Assistant in virtualenv
This file contains 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
function hass-upgrade { | |
echo "Stopping homeassistant" | |
sudo systemctl stop home-assistant@homeassistant.service | |
sudo -u homeassistant -H /bin/bash <<EOF | |
echo "Activating virtualenv" | |
source /srv/homeassistant/bin/activate | |
echo "Upgrading homeassistant" | |
pip3 install --upgrade homeassistant | |
echo "Deactivating virtualenv" | |
deactivate | |
EOF | |
echo "Starting homeassistant" | |
sudo systemctl start home-assistant@homeassistant.service | |
} | |
hass-upgrade |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment