From 109bf2fa4f5c4c7da41f97266ef45d2b90b82d5c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 11 Mar 2021 10:08:52 +0100 Subject: [PATCH] Small fixes --- conf/config.ini.php | 6 +++--- manifest.json | 4 ++-- pull_request_template.md | 4 +--- scripts/install | 13 +++++-------- scripts/upgrade | 8 +++++++- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/conf/config.ini.php b/conf/config.ini.php index 78c6d31..d0f1ac0 100755 --- a/conf/config.ini.php +++ b/conf/config.ini.php @@ -1,7 +1,7 @@ ; DO NOT DELETE THIS LINE dbhost="localhost" dbport="3306" -dbuser="__dbuser__" -dbpass="__dbpass__" -dbname="__dbname__" +dbuser="__DB_USER__" +dbpass="__DB_PWD__" +dbname="__DB_NAME__" tblpfx="wt_" diff --git a/manifest.json b/manifest.json index 7f4ebcd..333838a 100644 --- a/manifest.json +++ b/manifest.json @@ -14,12 +14,12 @@ "email": "anmol@datamol.org" }, "requirements": { - "yunohost": ">= 4.0.0" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ "nginx", - "php7.0-fpm", + "php7.3-fpm", "mysql" ], "arguments": { diff --git a/pull_request_template.md b/pull_request_template.md index c10c82f..6c28fc5 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -13,6 +13,4 @@ ## Package_check results --- -*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* - -[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/webtrees_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/webtrees_ynh%20PR-NUM-%20(USERNAME)/) +* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/install b/scripts/install index 17c5af4..fb60486 100755 --- a/scripts/install +++ b/scripts/install @@ -48,7 +48,6 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= ynh_script_progression --message="Storing installation settings..." -ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url @@ -107,9 +106,9 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # Adding the details of the database to the config file -ynh_replace_string --match_string="__dbuser__" --replace_string="$db_name" --target_file="../conf/config.ini.php" -ynh_replace_string --match_string="__dbpass__" --replace_string="$db_pwd" --target_file="../conf/config.ini.php" -ynh_replace_string --match_string="__dbname__" --replace_string="$db_name" --target_file="../conf/config.ini.php" +ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_name" --target_file="../conf/config.ini.php" +ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="../conf/config.ini.php" +ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="../conf/config.ini.php" # Copy the config file to the final path cp ../conf/config.ini.php $final_path/data/. @@ -145,14 +144,12 @@ chmod -R 700 $final_path/data #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." +ynh_script_progression --message="Configuring permissions..." # Make app public if necessary or protect it if [ $is_public -eq 1 ] then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. - ynh_permission_update --permission "main" --add "visitors" + ynh_permission_update --permission="main" --add="visitors" fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 7cfc140..693b481 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME # Retrieve app settings domain=$(ynh_app_setting_get "$app" domain) path_url=$(ynh_app_setting_get "$app" path) -is_public=$(ynh_app_setting_get "$app" is_public) final_path=$(ynh_app_setting_get $app final_path) #================================================= @@ -48,6 +47,13 @@ if [ -z $final_path ]; then ynh_app_setting_set $app final_path $final_path fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #=================================================