From 86448b551d300d92022ab59e41fa95b27eeeffba Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 18 Dec 2020 22:44:52 +0100 Subject: [PATCH 1/2] Fix linter warnings --- check_process | 5 ----- manifest.json | 2 +- scripts/install | 20 ++++++++++---------- scripts/remove | 8 ++++---- scripts/restore | 16 ++++++++-------- scripts/upgrade | 22 +++++++++++----------- 6 files changed, 34 insertions(+), 39 deletions(-) diff --git a/check_process b/check_process index a194e83..68361f7 100644 --- a/check_process +++ b/check_process @@ -18,13 +18,8 @@ upgrade=1 backup_restore=1 multi_instance=0 - # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. - # incorrect_path=1 port_already_use=0 change_url=0 -;;; Levels - # If the level 5 (Package linter) is forced to 1. Please add justifications here. - Level 5=auto ;;; Options Email= Notification=none diff --git a/manifest.json b/manifest.json index 7086679..c239b5f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "LibreOffice-based online office suite with collaborative editing", "fr": "Suite office en ligne et collaborative, basée sur LibreOffice" }, - "version": "4.0.0~ynh1", + "version": "4.0.0~ynh2", "url": "https://collaboraoffice.com", "license": "MPL-2.0", "maintainer": { diff --git a/scripts/install b/scripts/install index 1d5aac7..34a6d25 100644 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_print_info --message="Validating installation parameters..." +ynh_script_progression --message="Validating installation parameters..." # Register (book) web path ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url @@ -41,7 +41,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_print_info --message="Storing installation settings..." +ynh_script_progression --message="Storing installation settings..." ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url @@ -53,7 +53,7 @@ ynh_app_setting_set --app=$app --key=nextcloud_domain --value=$nextcloud_domain #================================================= # FIND AND OPEN A PORT #================================================= -ynh_print_info --message="Configuring firewall..." +ynh_script_progression --message="Configuring firewall..." # Find a free port port=$(ynh_find_port --port=9980) @@ -63,7 +63,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port #=============================================== # ADD COLLABORA REPOSITORY #=============================================== -ynh_print_info --message="Add Collabora repository..." +ynh_script_progression --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 .) @@ -72,14 +72,14 @@ echo "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_ #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_print_info --message="Installing dependencies..." +ynh_script_progression --message="Installing dependencies..." ynh_install_app_dependencies $pkg_dependencies #================================================= # NGINX CONFIGURATION #================================================= -ynh_print_info --message="Configuring NGINX web server..." +ynh_script_progression --message="Configuring NGINX web server..." # Create a dedicated NGINX config ynh_add_nginx_config @@ -109,7 +109,7 @@ ynh_store_file_checksum "/etc/loolwsd/loolwsd.xml" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_print_info --message="Starting a systemd service..." +ynh_script_progression --message="Starting a systemd service..." # Start a systemd service ynh_systemd_action --service_name="loolwsd" --action="start" --log_path="systemd" --line_match="Started LibreOffice Online WebSocket Daemon" @@ -117,7 +117,7 @@ ynh_systemd_action --service_name="loolwsd" --action="start" --log_path="systemd #================================================= # SETUP SSOWAT #================================================= -ynh_print_info --message="Configuring SSOwat..." +ynh_script_progression --message="Configuring SSOwat..." # Make app public # unprotected_uris allows SSO credentials to be passed anyway. @@ -126,7 +126,7 @@ ynh_app_setting_set $app unprotected_uris "/" #================================================= # RELOAD NGINX #================================================= -ynh_print_info --message="Reloading NGINX web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload @@ -134,4 +134,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_print_info --message="Installation of $app completed" +ynh_script_progression --message="Installation of $app completed" diff --git a/scripts/remove b/scripts/remove index 91f4ab2..ecd3650 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_print_info --message="Loading installation settings..." +ynh_script_progression --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -24,7 +24,7 @@ port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_print_info --message="Removing dependencies..." +ynh_script_progression --message="Removing dependencies..." # Fix "rm: cannot remove '/etc/apt/apt.conf.d/25loolwsd': No such file or directory" # on apt remove @@ -36,7 +36,7 @@ ynh_remove_app_dependencies #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_print_info --message="Removing NGINX web server configuration..." +ynh_script_progression --message="Removing NGINX web server configuration..." # Remove the dedicated NGINX config ynh_remove_nginx_config @@ -75,4 +75,4 @@ ynh_secure_remove --file="/var/log/$app" # END OF SCRIPT #================================================= -ynh_print_info --message="Removal of $app completed" +ynh_script_progression --message="Removal of $app completed" diff --git a/scripts/restore b/scripts/restore index e6f9332..9c959fe 100644 --- a/scripts/restore +++ b/scripts/restore @@ -23,7 +23,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info --message="Loading settings..." +ynh_script_progression --message="Loading settings..." app=$YNH_APP_INSTANCE_NAME @@ -33,7 +33,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_print_info --message="Validating restoration parameters..." +ynh_script_progression --message="Validating restoration parameters..." ynh_webpath_available --domain=$domain --path_url=$path_url \ || ynh_die --message="Path not available: ${domain}${path_url}" @@ -51,7 +51,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #=============================================== # ADD COLLABORA REPOSITORY #=============================================== -ynh_print_info --message="Add Collabora repository..." +ynh_script_progression --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 .) @@ -60,7 +60,7 @@ echo "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_ #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_print_info --message="Reinstalling dependencies..." +ynh_script_progression --message="Reinstalling dependencies..." # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies @@ -68,14 +68,14 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE CONFIGURATION #================================================= -ynh_print_info --message="Restoring the configuration..." +ynh_script_progression --message="Restoring the configuration..." ynh_restore_file --origin_path="/etc/loolwsd/loolwsd.xml" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_print_info --message="Starting a systemd service..." +ynh_script_progression --message="Starting a systemd service..." ynh_systemd_action --service_name="loolwsd" --action="restart" --log_path="systemd" --line_match="Started LibreOffice Online WebSocket Daemon" @@ -84,7 +84,7 @@ ynh_systemd_action --service_name="loolwsd" --action="restart" --log_path="syste #================================================= # RELOAD NGINX #================================================= -ynh_print_info --message="Reloading NGINX web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload @@ -92,4 +92,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_print_info --message="Restoration completed for $app" +ynh_script_progression --message="Restoration completed for $app" diff --git a/scripts/upgrade b/scripts/upgrade index 34415b4..d360bbb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_print_info --message="Loading installation settings..." +ynh_script_progression --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -25,7 +25,7 @@ nextcloud_domain=$(ynh_app_setting_get --app="$app" --key=nextcloud_domain) #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_print_info --message="Ensuring downward compatibility..." +ynh_script_progression --message="Ensuring downward compatibility..." # Fix is_public as a boolean value if [ "$is_public" = "Yes" ]; then @@ -45,7 +45,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_print_info --message="Backing up the app before upgrading (may take a while)..." +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." # Backup the current version of the app ynh_backup_before_upgrade @@ -62,14 +62,14 @@ ynh_abort_if_errors #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_print_info --message="Stopping a systemd service..." +ynh_script_progression --message="Stopping a systemd service..." ynh_systemd_action --service_name="loolwsd" --action="stop" --log_path="systemd" --line_match="Stopped LibreOffice Online WebSocket Daemon." #================================================= # NGINX CONFIGURATION #================================================= -ynh_print_info --message="Upgrading nginx web server configuration..." +ynh_script_progression --message="Upgrading nginx web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config @@ -77,7 +77,7 @@ ynh_add_nginx_config #=============================================== # ADD COLLABORA REPOSITORY #=============================================== -ynh_print_info --message="Add Collabora repository..." +ynh_script_progression --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 .) @@ -86,7 +86,7 @@ echo "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_ #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_print_info --message="Upgrading dependencies..." +ynh_script_progression --message="Upgrading dependencies..." ynh_install_app_dependencies $pkg_dependencies @@ -113,7 +113,7 @@ ynh_store_file_checksum --file="$config" #================================================= # SETUP SSOWAT #================================================= -ynh_print_info --message="Upgrading SSOwat configuration..." +ynh_script_progression --message="Upgrading SSOwat configuration..." # Make app public # unprotected_uris allows SSO credentials to be passed anyway @@ -122,14 +122,14 @@ ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_print_info --message="Starting a systemd service..." +ynh_script_progression --message="Starting a systemd service..." ynh_systemd_action --service_name="loolwsd" --action="restart" --log_path="systemd" --line_match="Started LibreOffice Online WebSocket Daemon" #================================================= # RELOAD NGINX #================================================= -ynh_print_info --message="Reloading NGINX web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload @@ -137,4 +137,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_print_info --message="Upgrade of $app completed" +ynh_script_progression --message="Upgrade of $app completed" From 14ff75f98c8c8e11f6afb5ea5f6b62de22d4fa00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 19 Dec 2020 14:02:37 +0100 Subject: [PATCH 2/2] Set badge to SVG --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ed8ce0..83adeac 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Collabora for YunoHost [![Integration level](https://dash.yunohost.org/integration/collabora.svg)](https://dash.yunohost.org/appci/app/collabora) ![](https://ci-apps.yunohost.org/ci/badges/collabora.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/collabora.maintain.svg) -[![Install Collabora with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=collabora) +[![Install Collabora with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=collabora) > *This package allow you to install Collabora quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*