1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/homeassistant_ynh.git synced 2024-09-03 19:26:16 +02:00

Update upgrade

This commit is contained in:
ewilly 2021-11-15 21:40:50 +01:00 committed by GitHub
parent b4ad39fe3d
commit ed593c5d69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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/"