diff --git a/scripts/_common.sh b/scripts/_common.sh index 58ae541..710740d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,6 +6,7 @@ # dependencies used by the app pkg_dependencies="postgresql postgresql-contrib libstdc++6 rabbitmq-server libcurl4-dev" +extra_dependencies="onlyoffice-documentserver>=6.4.2" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 282d912..9132f90 100644 --- a/scripts/install +++ b/scripts/install @@ -80,6 +80,17 @@ ynh_script_progression --message="Add OnlyOffice repository..." apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 ynh_install_extra_repo --repo="deb http://download.onlyoffice.com/repo/debian squeeze main" --append +#================================================= +# INSTALL ONLYOFFICE +#================================================= +ynh_script_progression --message="Install OnlyOffice..." + +# The onlyoffice dev had the magnificent idea to add a "nginx restart" during +# the install/configure of their package, which is awful since that will +# restart nginx and the whole webadmin and maybe even the yunohost command +# running the install ... +ynh_exec_warn_less ynh_add_app_dependencies --package=$extra_dependencies + #================================================= # INSTALL DEPENDENCIES #================================================= @@ -87,6 +98,8 @@ ynh_script_progression --message="Installing dependencies..." ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies +# ynh_install_extra_app_dependencies --repo="https://updates.signald.org unstable main" --package="$extra_dependencies" --key="https://updates.signald.org/apt-signing-key.asc" + #================================================= # CREATE A POSTGRESQL DATABASE #================================================= @@ -125,17 +138,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-name string $db_name | debconf-set-selections -#================================================= -# INSTALL ONLYOFFICE -#================================================= -ynh_script_progression --message="Install OnlyOffice..." - -# The onlyoffice dev had the magnificent idea to add a "nginx restart" during -# the install/configure of their package, which is awful since that will -# restart nginx and the whole webadmin and maybe even the yunohost command -# running the install ... -ynh_exec_warn_less ynh_add_app_dependencies --package="onlyoffice-documentserver" - #================================================= # MODIFY A CONFIG FILE #================================================= @@ -178,8 +180,6 @@ ynh_script_progression --message="Generating fonts..." /usr/bin/documentserver-generate-allfonts.sh -#================================================= -# GENERIC FINALIZATION #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/restore b/scripts/restore index 81e9757..57646ff 100644 --- a/scripts/restore +++ b/scripts/restore @@ -68,6 +68,13 @@ ynh_script_progression --message="Add OnlyOffice repository..." apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 ynh_install_extra_repo --repo="deb http://download.onlyoffice.com/repo/debian squeeze main" --append +#================================================= +# REINSTALL ONLYOFFICE +#================================================= +ynh_script_progression --message="Reinstalling OnlyOffice..." + +ynh_exec_warn_less ynh_add_app_dependencies --package=$extra_dependencies + #================================================= # REINSTALL DEPENDENCIES #================================================= @@ -96,13 +103,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-name string $db_name | debconf-set-selections -#================================================= -# REINSTALL ONLYOFFICE -#================================================= -ynh_script_progression --message="Reinstalling OnlyOffice..." - -ynh_exec_warn_less ynh_add_app_dependencies --package="onlyoffice-documentserver" - #================================================= # RESTORE THE CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index b92df34..2a95c80 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -113,6 +113,21 @@ ynh_script_progression --message="Add OnlyOffice repository..." apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 ynh_install_extra_repo --repo="deb http://download.onlyoffice.com/repo/debian squeeze main" --append +#================================================= +# UPGRADE ONLYOFFICE +#================================================= +ynh_script_progression --message="Upgrading OnlyOffice..." + +# ynh_remove_app_dependencies +ynh_exec_warn_less ynh_add_app_dependencies --package=$extra_dependencies + +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." + +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies + #================================================= # CONFIGURE ONLYOFFICE #================================================= @@ -125,13 +140,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-name string $db_name | debconf-set-selections -#================================================= -# UPGRADE ONLYOFFICE -#================================================= -ynh_script_progression --message="Upgrading OnlyOffice..." - -ynh_exec_warn_less ynh_add_app_dependencies --package="onlyoffice-documentserver" - #================================================= # MODIFY A CONFIG FILE #=================================================