From c0009a1d2a521f866baaa18b2495d4d1561933e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 19:03:19 +0200 Subject: [PATCH] fix --- scripts/install | 29 +++++++++++------------------ scripts/upgrade | 8 ++++---- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/scripts/install b/scripts/install index c7800ad..249937f 100755 --- a/scripts/install +++ b/scripts/install @@ -13,8 +13,8 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -storage_quota="20gb" -ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota +#storage_quota="20gb" +#ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -45,13 +45,13 @@ pushd "$install_dir" ./xftp-server init --ip $public_ip4 --quota '20gb' --store-log --path $data_dir popd -#fingerprint=$(cat /etc/opt/simplex/fingerprint) -#ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint +fingerprint=$(cat /etc/opt/simplex/fingerprint) +ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint -#xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) -#ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint +xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) +ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint -#ynh_replace_string --match_string="port: 443" --replace_string="port: $port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini" +ynh_replace_string --match_string="port: 443" --replace_string="port: $port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini" chown -R $app:$app "/etc/opt/simplex" chown -R $app:$app "/etc/opt/simplex-xftp" @@ -59,12 +59,12 @@ chown -R $app:$app "/etc/opt/simplex-xftp" #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +#ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" +#ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" -chmod 400 "/etc/opt/simplex-xftp/file-server.ini" -chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" +#chmod 400 "/etc/opt/simplex-xftp/file-server.ini" +#chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" #================================================= # SYSTEM CONFIGURATION @@ -87,13 +87,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name="xftp" --action="start" --log_path="/var/log/$app/$app.log" - -fingerprint=$(cat /etc/opt/simplex/fingerprint) -ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint - -xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) -ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 7c65054..54ae51d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,10 +41,10 @@ ynh_systemd_action --service_name=xftp --action="stop" --log_path="/var/log/$app #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -if [ -z "${storage_quota:-}" ]; then - storage_quota="20gb" - ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota -fi +#if [ -z "${storage_quota:-}" ]; then +# storage_quota="20gb" +# ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota +#fi #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE