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
cb40e4e59c
commit
a622b59960
2 changed files with 4 additions and 0 deletions
|
@ -45,6 +45,7 @@ ynh_system_user_create --username="$app"
|
|||
|
||||
# create a directory for the installation of Home Assistant
|
||||
myynh_create_dir "$final_path"
|
||||
chown -R $app: "$final_path"
|
||||
|
||||
# create a directory with its log file
|
||||
myynh_create_dir "$(dirname "$log_file")"
|
||||
|
@ -52,6 +53,7 @@ touch "$log_file"
|
|||
|
||||
# create a directory for the datas of Home Assistant
|
||||
myynh_create_dir "$data_path/.cache"
|
||||
chown -R $app: "$data_path"
|
||||
|
||||
# build (if needed) & install Pyhton
|
||||
ynh_script_progression --message="Installing dependencies..."
|
||||
|
|
|
@ -55,6 +55,7 @@ ynh_script_progression --message="If needed, migrating to new app architecture..
|
|||
if [ ! -d "$final_path" ]; then
|
||||
# move $final_path to new directory
|
||||
mv "/opt/yunohost/$app" "$final_path"
|
||||
chown -R $app: "$final_path"
|
||||
fi
|
||||
if [ ! -d "$data_path" ]; then
|
||||
# move $data_path to new directory
|
||||
|
@ -62,6 +63,7 @@ if [ ! -d "$data_path" ]; then
|
|||
mv "$data_path/.$app/." "$data_path"
|
||||
rmdir "$data_path/.$app"
|
||||
ynh_replace_string --match_string="/home/homeassistant/.homeassistant" --replace_string="$data_path" --target_file="$data_path/configuration.yaml"
|
||||
chown -R $app: "$data_path"
|
||||
fi
|
||||
if [ ! -f "$log_file" ]; then
|
||||
# create a directory with its log file
|
||||
|
|
Loading…
Add table
Reference in a new issue