diff --git a/README.md b/README.md index aaa91b7..fb90e04 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,6 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to * x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/collabora%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/collabora/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/collabora%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/collabora/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/collabora%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/collabora/) ## Limitations diff --git a/scripts/install b/scripts/install index c9a1b84..3fe4456 100644 --- a/scripts/install +++ b/scripts/install @@ -63,23 +63,17 @@ ynh_app_setting_set --app=$app --key=port --value=$port #=============================================== # ADD COLLABORA REPOSITORY #=============================================== +ynh_print_info --message="Add Collabora repository..." -ynh_install_app_dependencies apt-transport-https apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D - -if [ "$(lsb_release --codename --short)" = "jessie" ]; then -echo 'deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian8 ./' | tee -a /etc/apt/sources.list.d/collabora.list -else - -echo 'deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian9 ./' | tee -a /etc/apt/sources.list.d/collabora.list -fi +DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .) +echo "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./" | tee -a /etc/apt/sources.list.d/collabora.list #================================================= # INSTALL DEPENDENCIES #================================================= ynh_print_info --message="Installing dependencies..." -ynh_package_update ynh_install_app_dependencies $pkg_dependencies #================================================= diff --git a/scripts/remove b/scripts/remove index ba75d43..32fdf2c 100644 --- a/scripts/remove +++ b/scripts/remove @@ -64,10 +64,10 @@ ynh_secure_remove --file="/etc/cron.d/$app" ynh_secure_remove --file="/etc/apt/sources.list.d/collabora.list" # Remove a directory securely -ynh_secure_remove --file="/etc/loolwsd/" +ynh_secure_remove --file="/etc/loolwsd" # Remove the log files -ynh_secure_remove --file="/var/log/$app/" +ynh_secure_remove --file="/var/log/$app" #================================================= # GENERIC FINALIZATION diff --git a/scripts/restore b/scripts/restore index 2a4c2bf..acd3a7d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -51,16 +51,11 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #=============================================== # ADD COLLABORA REPOSITORY #=============================================== +ynh_print_info --message="Add Collabora repository..." -ynh_install_app_dependencies apt-transport-https apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D - -if [ "$(lsb_release --codename --short)" = "jessie" ]; then -echo 'deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian8 ./' | tee -a /etc/apt/sources.list.d/collabora.list -else - -echo 'deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian9 ./' | tee -a /etc/apt/sources.list.d/collabora.list -fi +DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .) +echo "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./" | tee -a /etc/apt/sources.list.d/collabora.list #================================================= # REINSTALL DEPENDENCIES @@ -68,7 +63,6 @@ fi ynh_print_info --message="Reinstalling dependencies..." # Define and install dependencies -ynh_package_update ynh_install_app_dependencies $pkg_dependencies #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 678f95c..7dd9116 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,13 +74,22 @@ ynh_print_info --message="Upgrading nginx web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config +#=============================================== +# ADD COLLABORA REPOSITORY +#=============================================== +ynh_print_info --message="Add Collabora repository..." + +apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D +DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .) +echo "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./" | tee -a /etc/apt/sources.list.d/collabora.list + #================================================= # UPGRADE DEPENDENCIES #================================================= ynh_print_info --message="Upgrading dependencies..." -ynh_package_update -ynh_install_app_dependencies loolwsd code-brand +ynh_install_app_dependencies $pkg_dependencies + #================================================= # SPECIFIC UPGRADE #=================================================