diff --git a/scripts/restore b/scripts/restore index 6e893d4..ec7d0be 100644 --- a/scripts/restore +++ b/scripts/restore @@ -19,9 +19,12 @@ ynh_restore_file --origin_path="/etc/turnserver.conf" #================================================= # RESTORE THE COTURN DATAPATH #================================================= -ynh_script_progression --message="Restoring Coturn Datapath..." --weight=1 +ynh_script_progression --message="Restoring the data directory..." --weight=1 -ynh_restore_file --origin_path="/home/yunohost.app/$app" +ynh_restore_file --origin_path="$data_dir" --not_mandatory + +# (Same as for install dir) +chown -R $app:www-data "$data_dir" #================================================= # RESTORE LOG @@ -69,11 +72,6 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="Coturn TURN server" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_turnserver_tls" #=================================================