1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/homeassistant_ynh.git synced 2024-09-03 19:26:16 +02:00
homeassistant_ynh/conf/homeassistant_conf_files/bin/upgrade_homeassistant.sh
ewilly@neuf.fr 0b11d8fd6e update
2019-06-09 18:30:25 +02:00

23 lines
510 B
Bash
Executable file

#!/bin/bash
# define usefull variables
app="homeassistant"
final_path="/opt/yunohost/$app"
# stop homeassistant systemd service
#sudo systemctl stop $app@$app.service
# create the virtual environment
python3 -m venv "$final_path"
# activate the virtual environment
. "$final_path/bin/activate"
# upgrade required python package
pip install --upgrade wheel
# upgrade homeassistant python package
pip install --upgrade $app
# restart homeassistant systemd service
sudo systemctl restart $app@$app.service