From 666cb3200b33ab7ae75ce74affb8afb8fdcbf624 Mon Sep 17 00:00:00 2001 From: Kayou Date: Fri, 17 May 2019 17:11:33 +0200 Subject: [PATCH 1/3] remove duplicated parts and update readme --- README.md | 48 +++++++++++++++--------------------------------- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index b18d3f9..a4fc0e8 100644 --- a/README.md +++ b/README.md @@ -29,16 +29,23 @@ You can extend - or even override - the Roundcube configuration which is coming * Official documentation: https://github.com/roundcube/roundcubemail/wiki * YunoHost documentation: https://github.com/YunoHost/doc/blob/master/app_roundcube.md: -## Licence - -LICENCE: GPL-3.0-only - ## YunoHost specific features In addition to Roundcube core features, the following are made available with -this package +this package: + + * Synchronize your email aliases as identities in Roundcube + * Install the [contextmenu](https://plugins.roundcube.net/packages/johndoh/contextmenu) + and [automatic addressbook](https://plugins.roundcube.net/packages/sblaisot/automatic_addressbook) + plugins by default + * Allow to install the [CardDAV](https://plugins.roundcube.net/packages/roundcube/carddav) + (address book) synchronization plugin at the installation - note that if + you have installed ownCloud or Baïkal, it will automatically add the + corresponding and existing address book. #### Multi-users support +* Integrate with YunoHost users and SSO - i.e. logout button, YunoHost users + search #### Supported architectures @@ -48,6 +55,8 @@ this package ## Limitations +* No known limitations. + ## Additional information #### Plugins @@ -94,38 +103,11 @@ steps as needed. You can also download the plugin and put it under the `plugins/` directory. In this case, do not forget to change ownerships of this folder to `roundcube`. -## YunoHost specific features - -In addition to Roundcube core features, the following are made available with -this package: - - * Synchronize your email aliases as identities in Roundcube - * Install the [contextmenu](https://plugins.roundcube.net/packages/johndoh/contextmenu) - and [automatic addressbook](https://plugins.roundcube.net/packages/sblaisot/automatic_addressbook) - plugins by default - * Allow to install the [CardDAV](https://plugins.roundcube.net/packages/roundcube/carddav) - (address book) synchronization plugin at the installation - note that if - you have installed ownCloud or Baïkal, it will automatically add the - corresponding and existing address book. - -#### Multi-users support -* Integrate with YunoHost users and SSO - i.e. logout button, YunoHost users - search -#### Supported architectures - -* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/roundcube%20%28Official%29.svg)](https://ci-apps.yunohost.org/ci/apps/roundcube/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/roundcube%20%28Official%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/roundcube/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/roundcube%20%28Official%29.svg)](https://ci-stretch.nohost.me/ci/apps/roundcube/) - -## Limitations - -* No known limitations. - - ## Links * Report a bug: https://github.com/YunoHost-Apps/roundcube_ynh/issues * Roundcube website: https://roundcube.net/ + * Upstream app repository: https://github.com/roundcube/roundcubemail * YunoHost website: https://yunohost.org/ --- From df1f47b87519a6a05930e5439212c0f19db8d2b0 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Sat, 18 May 2019 17:41:43 +0200 Subject: [PATCH 2/3] Add change_url script --- check_process | 2 +- scripts/change_url | 92 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 scripts/change_url diff --git a/check_process b/check_process index 04fdec0..5e41b28 100644 --- a/check_process +++ b/check_process @@ -17,7 +17,7 @@ multi_instance=1 incorrect_path=1 port_already_use=0 - change_url=0 + change_url=1 ;;; Levels Level 1=auto Level 2=auto diff --git a/scripts/change_url b/scripts/change_url new file mode 100644 index 0000000..14c221d --- /dev/null +++ b/scripts/change_url @@ -0,0 +1,92 @@ +#!/bin/bash + +#================================================= +# GENERIC STARTING +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source _common.sh +source /usr/share/yunohost/helpers + +#================================================= +# RETRIEVE ARGUMENTS +#================================================= + +old_domain=$YNH_APP_OLD_DOMAIN +old_path=$YNH_APP_OLD_PATH + +new_domain=$YNH_APP_NEW_DOMAIN +new_path=$YNH_APP_NEW_PATH + +app=$YNH_APP_INSTANCE_NAME + +#================================================= +# LOAD SETTINGS +#================================================= +ynh_script_progression --message="Loading installation settings..." + +# Needed for helper "ynh_add_nginx_config" +final_path=$(ynh_app_setting_get --app=$app --key=final_path) + +#================================================= +# CHECK WHICH PARTS SHOULD BE CHANGED +#================================================= + +change_domain=0 +if [ "$old_domain" != "$new_domain" ] +then + change_domain=1 +fi + +change_path=0 +if [ "$old_path" != "$new_path" ] +then + change_path=1 +fi + +#================================================= +# STANDARD MODIFICATIONS +#================================================= +# MODIFY URL IN NGINX CONF +#================================================= +ynh_script_progression --message="Updating nginx web server configuration..." --weight=2 + +nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf + +# Change the path in the nginx config file +if [ $change_path -eq 1 ] +then + # Make a backup of the original nginx config file if modified + ynh_backup_if_checksum_is_different --file="$nginx_conf_path" + # Set global variables for nginx helper + domain="$old_domain" + path_url="$new_path" + # Create a dedicated nginx config + ynh_add_nginx_config +fi + +# Change the domain for nginx +if [ $change_domain -eq 1 ] +then + # Delete file checksum for the old conf file location + ynh_delete_file_checksum --file="$nginx_conf_path" + mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf + # Store file checksum for the new config file location + ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" +fi + +#================================================= +# GENERIC FINALISATION +#================================================= +# RELOAD NGINX +#================================================= +ynh_script_progression --message="Reloading nginx web server..." + +ynh_systemd_action --service_name=nginx --action=reload + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Change of URL completed for $app" --last From e1e60efc09a0a127363139cdb79000df966ba806 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Tue, 21 May 2019 12:56:13 +0200 Subject: [PATCH 3/3] Upgrade composer --- scripts/upgrade | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index d1eb374..3f4cb4b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -155,6 +155,9 @@ ynh_replace_string "__DBNAME__" $db_name "$rc_conf" #================================================= ynh_print_info "Updating dependencies with composer..." +# Upgrade composer itself +ynh_install_composer + # Check if dependencies need to be updated with composer if [ -f "$final_path/composer.json" ] then @@ -162,10 +165,8 @@ then else # Install composer.json cp "$final_path/composer.json-dist" "$final_path/composer.json" - - # Install composer - ynh_install_composer fi + #================================================= # UPGRADE ADDITIONAL PLUGINS #=================================================