1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/onlyoffice_ynh.git synced 2024-09-03 19:56:11 +02:00

Update upgrade

This commit is contained in:
Éric Gaspar 2023-04-25 10:18:41 +02:00
parent 6b05732bc1
commit dc21b881e3

View file

@ -25,27 +25,13 @@ ynh_script_progression --message="Ensuring downward compatibility..."
ynh_secure_remove --file="/etc/apt/sources.list.d/onlyoffice.list" ynh_secure_remove --file="/etc/apt/sources.list.d/onlyoffice.list"
ynh_secure_remove --file="/etc/apt/sources.list.d/nodesource.list" ynh_secure_remove --file="/etc/apt/sources.list.d/nodesource.list"
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
#REMOVEME? ynh_script_progression --message="Upgrading dependencies..."
#REMOVEME? ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#REMOVEME? ynh_exec_warn_less ynh_install_extra_app_dependencies --repo="deb http://deb.debian.org/debian/ $(lsb_release --codename --short) main contrib" --package=$contrib_dependencies --key="https://ftp-master.debian.org/keys/release-$(lsb_release --release --short).asc"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." ynh_script_progression --message="Upgrading NGINX web server configuration..."
if [ "$path" = "/" ]; then
ynh_replace_string --match_string="__SUB_PATH__" --replace_string="" --target_file="../conf/nginx.conf"
else
ynh_replace_string --match_string="__SUB_PATH__" --replace_string="$path" --target_file="../conf/nginx.conf"
fi
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config "nextclouddomain" ynh_add_nginx_config
#================================================= #=================================================
# SPECIFIC UPGRADE # SPECIFIC UPGRADE
@ -61,20 +47,6 @@ echo onlyoffice-documentserver onlyoffice/db-user string $db_user | debconf-set-
echo onlyoffice-documentserver onlyoffice/db-pwd password $db_pwd | debconf-set-selections echo onlyoffice-documentserver onlyoffice/db-pwd password $db_pwd | debconf-set-selections
echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set-selections echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set-selections
#=================================================
# UPGRADE ONLYOFFICE
#=================================================
ynh_script_progression --message="Upgrading OnlyOffice..."
ynh_remove_extra_repo --name="$app" # backward compat
# keyserver.ubuntu.com response an error 500 regularly
# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5
#REMOVEME? # ynh_remove_app_dependencies
ynh_install_extra_app_dependencies --repo="https://download.onlyoffice.com/repo/debian squeeze main" --package=$extra_dependencies --key="https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE"
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE
#================================================= #=================================================