mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
23 lines
510 B
Bash
Executable file
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
|