From 848c0a2c63f819b0174cd860d587ac230e04e450 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Wed, 10 Feb 2021 22:14:53 +0100 Subject: [PATCH] Update Admin mail info --- conf/message | 2 ++ scripts/change_url | 4 +++- scripts/install | 8 ++++++++ scripts/upgrade | 10 +++++++++- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/conf/message b/conf/message index 8919e58..1116fbd 100644 --- a/conf/message +++ b/conf/message @@ -1,3 +1,5 @@ Standard Notes - Syncing Server was successfully __TYPE__. Please configure the Standard Notes web app or mobile app to use this syning server: https://__DOMAIN____PATH_URL__/ __CONFIG_PANEL__ + +__ADMIN_MAIL_INFO__ diff --git a/scripts/change_url b/scripts/change_url index f8056d5..10e6dcf 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -192,12 +192,14 @@ 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." -ynh_replace_string --match_string="__TYPE__" --replace_string="changed the url" --target_file="../conf/message" +ynh_replace_string --match_string="__TYPE__" --replace_string="updated ( Changed the url )" --target_file="../conf/message" ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../conf/message" ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="../conf/message" ynh_replace_string --match_string="__CONFIG_PANEL__" --replace_string="$config_panel" --target_file="../conf/message" +ynh_replace_string --match_string="__ADMIN_MAIL_INFO__" --replace_string="$admin_mail_info" --target_file="../conf/message" ynh_send_readme_to_admin --app_message="../conf/message" --type='change_url' diff --git a/scripts/install b/scripts/install index 0bfd368..292ae64 100755 --- a/scripts/install +++ b/scripts/install @@ -302,11 +302,19 @@ 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\ +New users will get an e-mail with install instructions.\n\ +With the current SMTP settings you can not send e-mails to all e-mail providers. For example GMail will probably not recive this e-mails.\n\ +Please setup the SMTP account in this file: \"$final_path/live/.env\" under \"#Mailer settings\" if you want to fix this.\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." + ynh_replace_string --match_string="__TYPE__" --replace_string="installed" --target_file="../conf/message" ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../conf/message" ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="../conf/message" ynh_replace_string --match_string="__CONFIG_PANEL__" --replace_string="$config_panel" --target_file="../conf/message" +ynh_replace_string --match_string="__ADMIN_MAIL_INFO__" --replace_string="$admin_mail_info" --target_file="../conf/message" ynh_send_readme_to_admin --app_message="../conf/message" --type='install' diff --git a/scripts/upgrade b/scripts/upgrade index c493af3..bb9aa73 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -369,12 +369,20 @@ 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="\ +New Feature ( 3.13.6~ynh4 ):\n\ +Now Standard Notes extensions are hosted with this package.\n\ +Only new users will get an e-mail with install instructions.\n\ +With the current SMTP settings you can not send e-mails to all e-mail providers. For example GMail will probably not recive this e-mails.\n\ +Please setup the SMTP account in this file: \"$final_path/live/.env\" under \"#Mailer settings\" if you want to fix this.\n\ +Please setup the Access-Domain for the extensions in the __URL_TAG1__config-panel__URL_TAG2__$admin_panel/config-panel__URL_TAG3__" -ynh_replace_string --match_string="__TYPE__" --replace_string="installed" --target_file="../conf/message" +ynh_replace_string --match_string="__TYPE__" --replace_string="upgraded" --target_file="../conf/message" ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../conf/message" ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="../conf/message" ynh_replace_string --match_string="__CONFIG_PANEL__" --replace_string="$config_panel" --target_file="../conf/message" +ynh_replace_string --match_string="__ADMIN_MAIL_INFO__" --replace_string="$admin_mail_info" --target_file="../conf/message" ynh_send_readme_to_admin --app_message="../conf/message" --type='upgrade'