diff --git a/conf/local.py.j2 b/conf/local.py.j2 index 4260a07..39ffa11 100644 --- a/conf/local.py.j2 +++ b/conf/local.py.j2 @@ -7,7 +7,8 @@ DEBUG = TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['{{ domain }}'] -URL_PREFIX = '{{ prefix }}' +# Prefix is hard coded for now as the app can only be installed on whole domain +URL_PREFIX = '' STATIC_ROOT = '{{ install_dir }}/static' NOTIFICATION_EMAILS = ['{{ email }}'] DEFAULT_FROM_EMAIL = 'notifier@{{ domain }}' diff --git a/manifest.toml b/manifest.toml index 30b620e..eb81013 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ website = "https://code.ffdn.org/FFDN/coin" code = "https://code.ffdn.org/ffdn/coin" [integration] -yunohost = ">= 11.2.0" +yunohost = ">= 11.2.13" architectures = "all" multi_instance = false ldap = false diff --git a/scripts/change_url b/scripts/change_url index 2eb3b36..f990470 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -7,9 +7,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app ynh_change_url_nginx_config -ynh_backup_if_checksum_is_different --file="$install_dir/coin/settings_local.py" -ynh_render_template ../conf/local.py.j2 "$install_dir/coin/settings_local.py" -ynh_store_file_checksum --file="$install_dir/coin/settings_local.py" +ynh_add_config --jinja --template=local.py.j2 --destination="$install_dir/coin/settings_local.py" chmod 400 "$install_dir/coin/settings_local.py" chown $app "$install_dir/coin/settings_local.py" diff --git a/scripts/install b/scripts/install index e5a75ee..3133d5b 100644 --- a/scripts/install +++ b/scripts/install @@ -3,7 +3,7 @@ source _common.sh source /usr/share/yunohost/helpers -export secret=$(ynh_string_random 24) +secret=$(ynh_string_random 24) ynh_app_setting_set --app=$app --key=secret --value=$secret #================================================= @@ -37,10 +37,7 @@ popd #================================================= ynh_script_progression --message="Configuring application..." -export prefix="${path#"/"}/" -prefix=${prefix%"/"} -ynh_render_template ../conf/local.py.j2 "$install_dir/coin/settings_local.py" -ynh_store_file_checksum --file="$install_dir/coin/settings_local.py" +ynh_add_config --jinja --template=local.py.j2 --destination="$install_dir/coin/settings_local.py" chmod 400 "$install_dir/coin/settings_local.py" chown $app "$install_dir/coin/settings_local.py"