mirror of
https://github.com/YunoHost-Apps/collabora_ynh.git
synced 2024-09-03 18:16:25 +02:00
cleaning
This commit is contained in:
parent
7b8112d687
commit
f74b4ae492
5 changed files with 18 additions and 51 deletions
|
@ -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"
|
||||
|
|
@ -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"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue