1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/roundcube_ynh.git synced 2024-09-03 20:16:28 +02:00

Merge branch 'testing' into package_upgrade

This commit is contained in:
Maniack Crudelis 2019-05-26 12:02:42 +02:00 committed by GitHub
commit 9c84db065d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 113 additions and 40 deletions

View file

@ -29,25 +29,34 @@ 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
* 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/)
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/roundcube%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/roundcube/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/roundcube%20%28Apps%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%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/roundcube/)
## Limitations
* No known limitations.
## Additional information
#### Plugins
@ -94,34 +103,6 @@ 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%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/roundcube/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/roundcube%20%28Apps%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%28Apps%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

View file

@ -17,7 +17,7 @@
multi_instance=1
incorrect_path=1
port_already_use=0
change_url=0
change_url=1
;;; Levels
Level 5=auto
;;; Options

92
scripts/change_url Normal file
View file

@ -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

View file

@ -165,6 +165,9 @@ then
#=================================================
ynh_script_progression --message="Updating dependencies with composer..." --weight=30
# Upgrade composer itself
ynh_install_composer
# Check if dependencies need to be updated with composer
if [ -f "$final_path/composer.json" ]
then
@ -172,9 +175,6 @@ then
else
# Install composer.json
cp "$final_path/composer.json-dist" "$final_path/composer.json"
# Install composer
ynh_install_composer
fi
#=================================================
# UPGRADE ADDITIONAL PLUGINS