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'