From 76b889de9b5dffa775a6a7d12a53e574b7761408 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Wed, 14 Jul 2021 21:25:17 +0200 Subject: [PATCH 1/6] Fix: - Admin_mail - Remove yunohost service - nginx.conf - help page --- conf/nginx.conf | 4 ++++ scripts/change_url | 9 +++------ scripts/install | 15 ++++++--------- scripts/remove | 20 ++++++++++++++++++-- scripts/upgrade | 18 +++++++++--------- 5 files changed, 40 insertions(+), 26 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 0a2c2a5..1a16b2f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -17,6 +17,10 @@ location = __PATH__/ { return 200 "This is where Standard Notes - Syncing Server is installed."; } +location = __PATH__/help { + return 301 https://$server_name__PATH__/help/; +} + location __PATH__/help/ { alias __FINAL_PATH_WWW__/help/; diff --git a/scripts/change_url b/scripts/change_url index c489c9e..9ee1b05 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -158,14 +158,11 @@ ynh_script_progression --message="Sending a readme for the admin..." admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app" -config_panel="You can find some specific configurations for this app by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__" -admin_mail_info="You changed the url of the server. All Extensions have to be reinstalled by the users. Or you can change the url back." - echo -e "\ Standard Notes - Syncing Server's url was successfully changed.\n\ -Please configure the Standard Notes web app or mobile app to use this syncing server: https://$domain$path_url/\n\ -$config_panel\n\n\ -$admin_mail_info\ +Please configure the Standard Notes web app or mobile app to use this syncing server: https://$domain$path_url\n\ +\n\ +You changed the url of the server. All Extensions have to be reinstalled by the users. Or you can change the url back.\ " > message ynh_send_readme_to_admin --app_message="message" --type='change_url' diff --git a/scripts/install b/scripts/install index d77de6f..b0ef136 100755 --- a/scripts/install +++ b/scripts/install @@ -352,18 +352,15 @@ ynh_systemd_action --service_name=nginx --action=reload ynh_script_progression --message="Sending a readme for the admin..." admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app" -config_panel="You can find some specific configurations for this app by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__" - -admin_mail_info="\ -Standard Notes extensions are hosted with this package.\n\ -Please setup the Access-Domain for the extensions in the __URL_TAG1__config-panel__URL_TAG2__$admin_panel/config-panel__URL_TAG3__ if not already done during the installation settings.\ -" echo -e "\ Standard Notes - Syncing Server was successfully installed.\n\ -Please configure the Standard Notes web app or mobile app to use this syncing server: https://$domain$path_url/\n\ -$config_panel\n\n\ -$admin_mail_info\ +Please configure the Standard Notes web app or mobile app to use this syncing server: https://$domain$path_url\n\ +\n\ +Standard Notes extensions are hosted with this package.\n\ +An Help page for setting-up the Standard Notes Server and Extensions have been created under: https://$domain$path_url/help\n\ +The Hele page is accessible via the Yunohost Portal.\n\ +You can deactivate the Help page under: $admin_panel\ " > message ynh_send_readme_to_admin --app_message="message" --type='install' diff --git a/scripts/remove b/scripts/remove index 6b0f990..e515606 100755 --- a/scripts/remove +++ b/scripts/remove @@ -36,13 +36,29 @@ final_path_www=$(ynh_app_setting_get --app=$app --key=final_path_www) #================================================= # Remove the service from the list of services known by Yunohost (added from `yunohost service add`) -if ynh_exec_warn_less yunohost service status $app >/dev/null +if ynh_exec_warn_less yunohost service status "$app-syncing-server-js" >/dev/null then - ynh_script_progression --message="Removing $app service..." --weight=1 + ynh_script_progression --message="Removing $app-syncing-server-js service..." --weight=1 yunohost service remove "$app-syncing-server-js" +fi +if ynh_exec_warn_less yunohost service status "$app-syncing-server-js-worker" >/dev/null +then + ynh_script_progression --message="Removing $app-syncing-server-js-worker service..." --weight=1 yunohost service remove "$app-syncing-server-js-worker" +fi +if ynh_exec_warn_less yunohost service status "$app-auth" >/dev/null +then + ynh_script_progression --message="Removing $app-auth service..." --weight=1 yunohost service remove "$app-auth" +fi +if ynh_exec_warn_less yunohost service status "$app-auth-worker" >/dev/null +then + ynh_script_progression --message="Removing $app-auth-worker service..." --weight=1 yunohost service remove "$app-auth-worker" +fi +if ynh_exec_warn_less yunohost service status "$app-api-gateway" >/dev/null +then + ynh_script_progression --message="Removing $app-api-gateway service..." --weight=1 yunohost service remove "$app-api-gateway" fi diff --git a/scripts/upgrade b/scripts/upgrade index c2bb727..1e2a553 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -244,7 +244,9 @@ if [ -n $(ynh_app_setting_get --app="$app" --key=port) ]; then fi # If old service exsits; remove it -if grep -q "$app:" "/etc/yunohost/services.yml"; then +if ynh_exec_warn_less yunohost service status "$app" >/dev/null +then + ynh_script_progression --message="Removing $app service..." --weight=1 yunohost service remove "$app" fi @@ -552,17 +554,15 @@ ynh_systemd_action --service_name=nginx --action=reload ynh_script_progression --message="Sending a readme for the admin..." admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app" -config_panel="You can find some specific configurations for this app by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__" -admin_mail_info="\ -Standard Notes extensions are hosted with this package.\n\ -Please setup the Access-Domain for the extensions in the __URL_TAG1__config-panel__URL_TAG2__$admin_panel/config-panel__URL_TAG3__\ -" echo -e "\ Standard Notes - Syncing Server was successfully upgraded.\n\ -Please configure the Standard Notes web app or mobile app to use this syncing server: https://$domain$path_url/\n\ -$config_panel\n\n\ -$admin_mail_info\ +Please configure the Standard Notes web app or mobile app to use this syncing server: https://$domain$path_url\n\ +\n\ +Standard Notes extensions are hosted with this package.\n\ +An Help page for setting-up the Standard Notes Server and Extensions have been created under: https://$domain$path_url/help\n\ +The Hele page is accessible via the Yunohost Portal.\n\ +You can deactivate the Help page under: $admin_panel\ " > message ynh_send_readme_to_admin --app_message="message" --type='upgrade' From 4346945ed856dd71622f9df946362c633dd5de66 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Wed, 14 Jul 2021 21:28:37 +0200 Subject: [PATCH 2/6] Update: manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index c5c16ef..5411338 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "The Standard Notes syncing server. An end-to-end encrypted note-taking app." }, - "version": "2021.07.06~ynh1", + "version": "2021.07.06~ynh2", "url": "https://github.com/standardnotes/standalone", "upstream": { "license": "AGPL-3.0-or-later", From 8612ea1cb9af45947d02efc775024ddbf0a077fd Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Wed, 14 Jul 2021 19:29:19 +0000 Subject: [PATCH 3/6] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c236d0d..f5f4fa9 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in The Standard Notes syncing server. An end-to-end encrypted note-taking app. -**Shipped version:** 2021.07.06~ynh1 +**Shipped version:** 2021.07.06~ynh2 **Demo:** https://standardnotes.org/demo diff --git a/README_fr.md b/README_fr.md index db43890..c0f05ae 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour -**Version incluse :** 2021.07.06~ynh1 +**Version incluse :** 2021.07.06~ynh2 **Démo :** https://standardnotes.org/demo From f823a7a42eec77eddaa961d575931fd3254125f6 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Sat, 17 Jul 2021 15:33:23 +0200 Subject: [PATCH 4/6] Fix: permissionsfor help page in upgrade script --- scripts/upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 1e2a553..3f55848 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -131,16 +131,16 @@ fi # Everyone can access the app. if [[ $(ynh_permission_exists --permission="main") && ! $standalone ]] then - ynh_permission_update --permission="main" --add="visitors" --show_tile="false" + ynh_permission_update --permission="main" --add="visitors" --show_tile="false" fi if ! ynh_permission_exists --permission="main" then - ynh_permission_create --permission="main" --url="/" --allowed="visitors" --show_tile="false" + ynh_permission_create --permission="main" --url="/" --allowed="visitors" --show_tile="false" fi # Create a permission if needed if ! ynh_permission_exists --permission="help" then - ynh_permission_create --permission="help" --url="/help" --allowed="all_users" + ynh_permission_create --permission="help" --url="/help/" --allowed="all_users" --show_tile="true" --label="Help" fi # If final_path doesn't exist, create it From e485d7b6e02429c4876d378f7a116ec398d7ce4c Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Sat, 17 Jul 2021 15:36:18 +0200 Subject: [PATCH 5/6] Fix: Typo --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index b0ef136..114667b 100755 --- a/scripts/install +++ b/scripts/install @@ -359,7 +359,7 @@ Please configure the Standard Notes web app or mobile app to use this syncing se \n\ Standard Notes extensions are hosted with this package.\n\ An Help page for setting-up the Standard Notes Server and Extensions have been created under: https://$domain$path_url/help\n\ -The Hele page is accessible via the Yunohost Portal.\n\ +The Help page is accessible via the Yunohost Portal.\n\ You can deactivate the Help page under: $admin_panel\ " > message diff --git a/scripts/upgrade b/scripts/upgrade index 3f55848..266e0df 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -561,7 +561,7 @@ Please configure the Standard Notes web app or mobile app to use this syncing se \n\ Standard Notes extensions are hosted with this package.\n\ An Help page for setting-up the Standard Notes Server and Extensions have been created under: https://$domain$path_url/help\n\ -The Hele page is accessible via the Yunohost Portal.\n\ +The Help page is accessible via the Yunohost Portal.\n\ You can deactivate the Help page under: $admin_panel\ " > message From 79a9d1c088c198a71fc7552ec5f4aab91aa5f3b2 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Sat, 17 Jul 2021 15:47:56 +0200 Subject: [PATCH 6/6] Update: issue and PR templates --- .github/ISSUE_TEMPLATE.md | 1 - .github/PULL_REQUEST_TEMPLATE.md | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 94259cd..2729a6b 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -53,4 +53,3 @@ about: When creating a bug report, please use the following template to provide *After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* *If applicable and useful, add screenshots to help explain your problem.* - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4af1aa3..ef70e18 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -14,4 +14,3 @@ ## Automatic tests Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) -