2019-06-09 18:30:25 +02:00
|
|
|
#!/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
|
2020-08-27 20:58:38 +02:00
|
|
|
python3 -m pip install --upgrade wheel
|
2019-06-09 18:30:25 +02:00
|
|
|
|
|
|
|
# upgrade homeassistant python package
|
2020-08-27 20:58:38 +02:00
|
|
|
pip3 install --upgrade $app
|
2019-06-09 18:30:25 +02:00
|
|
|
|
|
|
|
# restart homeassistant systemd service
|
|
|
|
sudo systemctl restart $app@$app.service
|