1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/homeassistant_ynh.git synced 2024-09-03 19:26:16 +02:00
This commit is contained in:
ewilly 2020-08-14 13:25:58 +02:00
parent 6368f759c4
commit bd41de5df3
3 changed files with 8 additions and 8 deletions

View file

@ -6,7 +6,7 @@ After=network-online.target
Type=simple Type=simple
User=homeassistant User=homeassistant
WorkingDirectory=/home/homeassistant/.homeassistant WorkingDirectory=/home/homeassistant/.homeassistant
ExecStart=/opt/yunohost/homeassistant/bin/hass -c "/home/homeassistant/.homeassistant" --debug ExecStart=/opt/yunohost/homeassistant/bin/hass -c "/home/homeassistant/.homeassistant" --verbose
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -60,9 +60,9 @@ exec_as $app -H -s /bin/bash -c " \
&& echo 'activate the virtual environment' \ && echo 'activate the virtual environment' \
&& source "$final_path/bin/activate" \ && source "$final_path/bin/activate" \
&& echo 'install a required python package' \ && echo 'install a required python package' \
&& pip install --upgrade wheel \ && python3 -m pip install --upgrade wheel \
&& echo 'install Home Assistant' \ && echo 'install Home Assistant' \
&& pip install --upgrade $app==$VERSION \ && pip3 install --upgrade $app==$VERSION \
" "
# set default configuration files # set default configuration files

View file

@ -50,15 +50,15 @@ ynh_systemd_action --service_name="$app@$app" --action=stop
# installation in a virtual environment # installation in a virtual environment
ynh_script_progression --message="Installing Home Assistant in a virtual environment..." ynh_script_progression --message="Installing Home Assistant in a virtual environment..."
exec_as "$app" -H -s /bin/bash -c " \ exec_as $app -H -s /bin/bash -c " \
echo 'create the virtual environment' \ echo 'create the virtual environment' \
&& python3 -m venv $final_path \ && python3 -m venv "$final_path" \
&& echo 'activate the virtual environment' \ && echo 'activate the virtual environment' \
&& source $final_path/bin/activate \ && source "$final_path/bin/activate" \
&& echo 'install a required python package' \ && echo 'install a required python package' \
&& pip install --upgrade wheel \ && python3 -m pip install --upgrade wheel \
&& echo 'install Home Assistant' \ && echo 'install Home Assistant' \
&& pip install --upgrade $app==$VERSION \ && pip3 install --upgrade $app==$VERSION \
" "
# setup up systemd service # setup up systemd service