From e1dd294edff4688f0f44284b603feaad7bdc7374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 4 Jan 2024 15:16:51 +0100 Subject: [PATCH] Fix document_path not defined --- scripts/install | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/install b/scripts/install index 7efac89..ee15522 100755 --- a/scripts/install +++ b/scripts/install @@ -21,6 +21,23 @@ ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" chown -R "$app:$app" "$install_dir" +#================================================= +# Configure document storage +#================================================= +ynh_script_progression --message="Configuring document storage..." --weight=1 + +document_path=$data_dir/docs +ynh_app_setting_set --app="$app" --key=document_path --value="$document_path" + +document_url=$(append_uri "https://${domain}${path}" "docs") +ynh_app_setting_set --app="$app" --key=document_url --value="$document_url" + +# Add the status page +ynh_add_config --template="index.html" --destination="$data_dir/index.html" + +chmod -R o-rwx "$data_dir" +chown -R $app:www-data "$data_dir" + #================================================= # ADD A CONFIGURATION #================================================= @@ -61,23 +78,6 @@ if [ -n "$public_key" ]; then chmod o-rwx,gu=r "/etc/sudoers.d/$app-sudoers" fi -#================================================= -# Configure document storage -#================================================= -ynh_script_progression --message="Configuring document storage..." --weight=1 - -# Add the status page -ynh_add_config --template="index.html" --destination="$data_dir/index.html" - -document_path=$data_dir/docs -ynh_app_setting_set --app="$app" --key=document_path --value="$document_path" - -chmod -R o-rwx "$data_dir" -chown -R $app:www-data "$data_dir" - -document_url=$(append_uri "https://${domain}${path}" "docs") -ynh_app_setting_set --app="$app" --key=document_url --value="$document_url" - #================================================= # INSTALL MONGO #=================================================