mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
Fix
This commit is contained in:
parent
e0a7f57396
commit
3f162902c1
3 changed files with 8 additions and 4 deletions
|
@ -143,14 +143,17 @@ myynh_install_homeassistant () {
|
|||
local legacy_args=u
|
||||
local -A args_array=( [p]=path= )
|
||||
local path
|
||||
# Manage arguments with getopts
|
||||
ynh_handle_getopts_args "$@"
|
||||
|
||||
exec_as $app -H -s /bin/bash -c " \
|
||||
echo 'create the virtual environment' \
|
||||
&& $MY_PYTHON -m venv "$final_path" \
|
||||
&& echo 'activate the virtual environment' \
|
||||
&& source "$final_path/bin/activate" \
|
||||
&& echo 'install last version of wheel' \
|
||||
&& pip --cache-dir "$1/.cache" install --upgrade wheel \
|
||||
&& pip --cache-dir "$path/.cache" install --upgrade wheel \
|
||||
&& echo 'install Home Assistant' \
|
||||
&& pip --cache-dir "$1/.cache" install --upgrade $app==$VERSION \
|
||||
&& pip --cache-dir "$path/.cache" install --upgrade $app==$VERSION \
|
||||
"
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ chown $app: "$final_path"
|
|||
|
||||
# create a directory for the datas of Home Assistant
|
||||
myynh_create_dir "$data_path/.$app"
|
||||
myynh_create_dir "$data_path/.cache"
|
||||
chown -R $app: "$data_path"
|
||||
|
||||
# build (if needed) & install Pyhton
|
||||
|
@ -55,7 +56,7 @@ myynh_install_dependencies --python="$PY_REQUIRED_VERSION"
|
|||
|
||||
# installation in a virtual environment
|
||||
ynh_script_progression --message="Installing Home Assistant in a virtual environment..."
|
||||
myynh_install_homeassistant --path="$data_path"
|
||||
ynh_exec_fully_quiet myynh_install_homeassistant --path="$data_path"
|
||||
|
||||
# set default configuration files and move all homeassistant_conf_files
|
||||
ynh_script_progression --message="Configuring the installation..."
|
||||
|
|
|
@ -49,7 +49,7 @@ ynh_systemd_action --service_name="$app@$app" --action=stop --line_match="Stoppe
|
|||
|
||||
# installation in a virtual environment
|
||||
ynh_script_progression --message="Installing Home Assistant in a virtual environment..."
|
||||
myynh_install_homeassistant --path="$data_path"
|
||||
ynh_exec_fully_quiet myynh_install_homeassistant --path="$data_path"
|
||||
|
||||
# update script in bin
|
||||
ynh_script_progression --message="Updating YunoHost script used by homeassitant..."
|
||||
|
|
Loading…
Add table
Reference in a new issue