1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/collabora_ynh.git synced 2024-09-03 18:16:25 +02:00

Merge pull request #28 from YunoHost-Apps/fix-buster-install

[buster] Get rid of debian version specific/hardcoded stuff
This commit is contained in:
yalh76 2020-04-23 20:22:10 +02:00 committed by GitHub
commit efbe8c335b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 23 deletions

View file

@ -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/) * 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/) * 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 ## Limitations

View file

@ -63,23 +63,17 @@ ynh_app_setting_set --app=$app --key=port --value=$port
#=============================================== #===============================================
# ADD COLLABORA REPOSITORY # 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 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D
DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .)
if [ "$(lsb_release --codename --short)" = "jessie" ]; then echo "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./" | tee -a /etc/apt/sources.list.d/collabora.list
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
#================================================= #=================================================
# INSTALL DEPENDENCIES # INSTALL DEPENDENCIES
#================================================= #=================================================
ynh_print_info --message="Installing dependencies..." ynh_print_info --message="Installing dependencies..."
ynh_package_update
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================

View file

@ -64,10 +64,10 @@ ynh_secure_remove --file="/etc/cron.d/$app"
ynh_secure_remove --file="/etc/apt/sources.list.d/collabora.list" ynh_secure_remove --file="/etc/apt/sources.list.d/collabora.list"
# Remove a directory securely # Remove a directory securely
ynh_secure_remove --file="/etc/loolwsd/" ynh_secure_remove --file="/etc/loolwsd"
# Remove the log files # Remove the log files
ynh_secure_remove --file="/var/log/$app/" ynh_secure_remove --file="/var/log/$app"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION

View file

@ -51,16 +51,11 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=============================================== #===============================================
# ADD COLLABORA REPOSITORY # 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 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D
DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .)
if [ "$(lsb_release --codename --short)" = "jessie" ]; then echo "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./" | tee -a /etc/apt/sources.list.d/collabora.list
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
#================================================= #=================================================
# REINSTALL DEPENDENCIES # REINSTALL DEPENDENCIES
@ -68,7 +63,6 @@ fi
ynh_print_info --message="Reinstalling dependencies..." ynh_print_info --message="Reinstalling dependencies..."
# Define and install dependencies # Define and install dependencies
ynh_package_update
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================

View file

@ -74,13 +74,22 @@ ynh_print_info --message="Upgrading nginx web server configuration..."
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_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 # UPGRADE DEPENDENCIES
#================================================= #=================================================
ynh_print_info --message="Upgrading dependencies..." ynh_print_info --message="Upgrading dependencies..."
ynh_package_update ynh_install_app_dependencies $pkg_dependencies
ynh_install_app_dependencies loolwsd code-brand
#================================================= #=================================================
# SPECIFIC UPGRADE # SPECIFIC UPGRADE
#================================================= #=================================================