From 350e10a6442fb164abd76a595359df6e8e5ef9ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Fri, 5 Apr 2024 18:34:23 +0200 Subject: [PATCH] Yes --- scripts/change_url | 4 ++++ scripts/install | 7 ++++++- scripts/upgrade | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index 9aec754..139052a 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -41,6 +41,10 @@ ynh_backup_if_checksum_is_different --file="$install_dir/.env" ynh_replace_string --match_string="$document_url" --replace_string="$new_document_url" --target_file="$install_dir/.env" ynh_store_file_checksum --file="$install_dir/.env" +# Update the repository pages +ynh_add_config --template="repository-next.json" --destination="$data_dir/repository-next.json" +ynh_add_config --template="repository-stable.json" --destination="$data_dir/repository-stable.json" + #================================================= # GENERIC FINALISATION #================================================= diff --git a/scripts/install b/scripts/install index b6a9c5a..3ba89bb 100755 --- a/scripts/install +++ b/scripts/install @@ -35,9 +35,14 @@ ynh_app_setting_set --app="$app" --key=document_dir --value="$document_dir" document_url=$(append_uri "https://${domain}${path}" "docs") ynh_app_setting_set --app="$app" --key=document_url --value="$document_url" -# Add the status page +# Add the status pageindex ynh_add_config --template="index.html" --destination="$data_dir/index.html" +# Add the repository pages +ynh_add_config --template="repository-next.json" --destination="$data_dir/repository-next.json" +ynh_add_config --template="repository-stable.json" --destination="$data_dir/repository-stable.json" + + chmod -R o-rwx "$data_dir" chown -R $app:www-data "$data_dir" diff --git a/scripts/upgrade b/scripts/upgrade index 29459ed..0a3e921 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -117,6 +117,10 @@ ynh_script_progression --message="Configuring document storage..." --weight=1 ynh_add_config --template="index.html" --destination="$data_dir/index.html" +# Add the repository pages +ynh_add_config --template="repository-next.json" --destination="$data_dir/repository-next.json" +ynh_add_config --template="repository-stable.json" --destination="$data_dir/repository-stable.json" + chmod -R o-rwx "$data_dir" chown -R "$app:www-data" "$data_dir"