From ed593c5d6987e38565dca71253b0f64dab7164eb Mon Sep 17 00:00:00 2001 From: ewilly Date: Mon, 15 Nov 2021 21:40:50 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index ba76275..8f54e49 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -28,6 +28,12 @@ if [ -f "/etc/yunohost/apps/$app/scripts/backup" ] ; then } fi +# move $home_path to new directory +if [ -d "$home_path" ] ; then + mv "/home/$app" "$home_path" + chown -R $app: "$home_path" +fi + # grant sudo permissions to the user to manage his own systemd service ynh_script_progression --message="Creating dedicated user, rights and folders..." myynh_create_dir "/etc/sudoers.d" @@ -44,12 +50,6 @@ ynh_systemd_action --service_name="$app@$app" --action=stop ynh_script_progression --message="Installing Home Assistant in a virtual environment..." myynh_install_homeassistant "$home_path" -# move $home_path to new directory -if [ -d "$home_path" ] ; then - mv "/home/$app" "$home_path" - chown -R $app: "$home_path" -fi - # update script in bin ynh_script_progression --message="Updating YunoHost script used by homeassitant..." cp -r "../conf/homeassistant_conf_files/bin/." "$home_path/.$app/bin/"