From f74b4ae4920ba06febcf196227c92a682ffdd836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Nov 2023 09:08:14 +0100 Subject: [PATCH] cleaning --- manifest.toml | 19 +++++++++++++------ scripts/install | 3 ++- scripts/remove | 21 --------------------- scripts/restore | 15 --------------- scripts/upgrade | 11 +++-------- 5 files changed, 18 insertions(+), 51 deletions(-) diff --git a/manifest.toml b/manifest.toml index fdd7287..6fc658c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -15,11 +15,14 @@ website = "https://collaboraoffice.com" admindoc = "https://www.collaboraoffice.com/code/" [integration] -yunohost = ">= 11.1.16" +yunohost = ">= 11.2" architectures = ["amd64"] multi_instance = false + ldap = "not_relevant" + sso = "not_relevant" + disk = "50M" ram.build = "50M" ram.runtime = "50M" @@ -27,7 +30,12 @@ ram.runtime = "50M" [install] [install.domain] type = "domain" - full_domain = true + + [install.init_main_permission] + help.en = "You will only be able to connect Collabora to Nextcloud if both apps are public!" + help.fr = "Nextcloud et Collabora doivent ĂȘtre des applications publiques si vous voulez les connecter !" + type = "group" + default = "visitors" [install.password] type = "password" @@ -53,8 +61,7 @@ ram.runtime = "50M" [resources.apt] packages = "hunspell, hunspell-de-de, hunspell-en-gb, hunspell-fr" - [resources.apt.extras.collabora] - repo = "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian11 ./ " - key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D 2>/dev/null" - packages = "coolwsd, code-brand" + extras.collabora.repo = "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian11 ./ " + extras.collabora.key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D 2>/dev/null" + extras.collabora.packages = "coolwsd, code-brand" \ No newline at end of file diff --git a/scripts/install b/scripts/install index c0c970b..02ef065 100644 --- a/scripts/install +++ b/scripts/install @@ -19,7 +19,8 @@ ynh_script_progression --message="Installing config file..." --weight=2 # config directory which of course doesn't exists and we want to disable SSL # because we're in a reverse proxy context... mkdir -p /etc/coolwsd -ynh_add_config --template="../conf/coolwsd.xml" --destination="/etc/coolwsd/coolwsd.xml" + +ynh_add_config --template="coolwsd.xml" --destination="/etc/coolwsd/coolwsd.xml" chmod 640 "/etc/coolwsd/coolwsd.xml" #================================================= diff --git a/scripts/remove b/scripts/remove index e2cd386..23faad3 100644 --- a/scripts/remove +++ b/scripts/remove @@ -20,37 +20,16 @@ then yunohost service remove "coolwsd" fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - # Remove the dedicated systemd config ynh_remove_systemd_config --service="coolwsd" -#================================================= -# STANDARD REMOVE -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - # Fix "rm: cannot remove '/etc/apt/apt.conf.d/25loolwsd': No such file or directory" # on apt remove touch /etc/apt/apt.conf.d/25loolwsd -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 - # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# SPECIFIC REMOVE -#================================================= - # Remove a directory securely ynh_secure_remove --file="/etc/coolwsd" diff --git a/scripts/restore b/scripts/restore index 29a4514..fcfce13 100644 --- a/scripts/restore +++ b/scripts/restore @@ -18,19 +18,9 @@ source /usr/share/yunohost/helpers ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the configuration..." --weight=3 - ynh_restore_file --origin_path="/etc/coolwsd/coolwsd.xml" chmod 640 "/etc/coolwsd/coolwsd.xml" -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add "coolwsd" --description="Collabora online office suite" --log="/var/log/$app/$app.log" #================================================= @@ -40,11 +30,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name="coolwsd" --action="restart" --log_path="systemd" --line_match="Ready to accept connections" -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=2 - ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 3f43fd6..02aaecb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -45,23 +45,18 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +yunohost service add "coolwsd" --description="Collabora online office suite" --log="/var/log/$app/$app.log" + #================================================= # UPGRADE CONFIG #================================================= ynh_script_progression --message="Upgrading config file..." --weight=2 -ynh_add_config --template="../conf/coolwsd.xml" --destination="/etc/coolwsd/coolwsd.xml" +ynh_add_config --template="coolwsd.xml" --destination="/etc/coolwsd/coolwsd.xml" chown cool: "/etc/coolwsd/coolwsd.xml" chmod 640 "/etc/coolwsd/coolwsd.xml" -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add "coolwsd" --description="Collabora online office suite" --log="/var/log/$app/$app.log" - #================================================= # START SYSTEMD SERVICE #=================================================