diff --git a/scripts/install b/scripts/install index 979f588..280438f 100755 --- a/scripts/install +++ b/scripts/install @@ -30,9 +30,10 @@ chmod +x $install_dir/xftp-server # SPECIFIC SETUP #================================================= +public_ip4="$(curl -s ip.yunohost.org)" || true +ynh_app_setting_set --app=$app --key=public_ip4 --value=$public_ip4 + pushd "$install_dir" - public_ip4="$(curl -s ip.yunohost.org)" || true - ynh_app_setting_set --app=$app --key=public_ip4 --value=$public_ip4 ./smp-server init --no-password --ip $public_ip4 -y ./xftp-server init --ip $public_ip4 --quota '20gb' --store-log --path $data_dir popd diff --git a/scripts/restore b/scripts/restore index 2cd2443..fcc6eb2 100755 --- a/scripts/restore +++ b/scripts/restore @@ -20,6 +20,16 @@ ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" +#================================================= +# RESTORE THE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Restoring the data directory..." --weight=1 + +ynh_restore_file --origin_path="$data_dir" --not_mandatory + +# (Same as for install dir) +chown -R $app:www-data "$data_dir" + #================================================= # RESTORE SYSTEM CONFIGURATIONS #=================================================