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

Change order for dependencies

This commit is contained in:
yalh76 2019-02-26 20:11:40 +01:00
parent 9f257fbd17
commit ef2ca80d36
3 changed files with 36 additions and 44 deletions

View file

@ -87,25 +87,19 @@ port=$(ynh_find_port 8095)
ynh_app_setting_set $app port $port ynh_app_setting_set $app port $port
#================================================= #=================================================
# INSTALL DEPENDENCIES # ADD NODEJS REPOSITORY
#=================================================
ynh_print_info "Installing dependencies..."
### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package.
### Those deb packages will be installed as dependencies of this package.
### If you're not using this helper:
### - Remove the section "REMOVE DEPENDENCIES" in the remove script
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
ynh_install_app_dependencies postgresql libstdc++6 redis-server rabbitmq-server
#=================================================
# INSTALL NODEJS
#================================================= #=================================================
ynh_print_info "Installing nodejs..." ynh_print_info "Installing nodejs..."
#curl -sL https://deb.nodesource.com/setup_8.x | sudo bash - curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
#=================================================
# ADD ONLYOFFICE REPOSITORY
#=================================================
ynh_print_info "Add OnlyOffice repository..."
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5
echo "deb http://download.onlyoffice.com/repo/debian squeeze main" | sudo tee /etc/apt/sources.list.d/onlyoffice.list
#================================================= #=================================================
# CREATE A POSTGRESQL DATABASE # CREATE A POSTGRESQL DATABASE
@ -121,6 +115,7 @@ ynh_print_info "Creating a PostgreSQL database..."
### - Remove also the section "REMOVE THE POSTGRESQL DATABASE" in the remove script ### - Remove also the section "REMOVE THE POSTGRESQL DATABASE" in the remove script
### - As well as the section "RESTORE THE POSTGRESQL DATABASE" in the restore script ### - As well as the section "RESTORE THE POSTGRESQL DATABASE" in the restore script
ynh_package_install postgresql
db_name=$(ynh_sanitize_dbid $app) db_name=$(ynh_sanitize_dbid $app)
db_pwd="onlyoffice" db_pwd="onlyoffice"
ynh_app_setting_set $app db_name $db_name ynh_app_setting_set $app db_name $db_name
@ -128,6 +123,27 @@ ynh_app_setting_set $app db_pwd $db_pwd
ynh_psql_test_if_first_run ynh_psql_test_if_first_run
ynh_psql_create_db $db_name $db_name $db_pwd ynh_psql_create_db $db_name $db_name $db_pwd
#=================================================
# DEFINE PORT
#=================================================
ynh_print_info "Define OnlyOffice server port..."
echo onlyoffice-documentserver onlyoffice/ds-port select ${port} | sudo debconf-set-selections
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_print_info "Installing dependencies..."
### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package.
### Those deb packages will be installed as dependencies of this package.
### If you're not using this helper:
### - Remove the section "REMOVE DEPENDENCIES" in the remove script
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
ynh_install_app_dependencies postgresql libstdc++6 redis-server rabbitmq-server onlyoffice-documentserver
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
@ -162,27 +178,8 @@ ynh_system_user_create $app $final_path
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
#================================================= #=================================================
# DEFINE PORT # ...
#================================================= #=================================================
ynh_print_info "Define OnlyOffice server port..."
echo onlyoffice-documentserver onlyoffice/ds-port select ${port} | sudo debconf-set-selections
#=================================================
# ADD ONLYOFFICE REPOSITORY
#=================================================
ynh_print_info "Add OnlyOffice repository..."
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5
echo "deb http://download.onlyoffice.com/repo/debian squeeze main" | sudo tee /etc/apt/sources.list.d/onlyoffice.list
ynh_package_update
#=================================================
# INSTALL ONLYOFFICE
#=================================================
ynh_print_info "Install OnlyOffice..."
ynh_package_install onlyoffice-documentserver
#================================================= #=================================================
# MODIFY A CONFIG FILE # MODIFY A CONFIG FILE

View file

@ -80,6 +80,8 @@ fi
# Remove a directory securely # Remove a directory securely
ynh_secure_remove "/etc/apt/sources.list.d/onlyoffice.list" ynh_secure_remove "/etc/apt/sources.list.d/onlyoffice.list"
ynh_secure_remove "/etc/apt/sources.list.d/onlyoffice.list"
ynh_secure_remove "/etc/apt/sources.list.d/nodesource.list"
# Remove the log files # Remove the log files
ynh_secure_remove "/var/log/$app/" ynh_secure_remove "/var/log/$app/"

View file

@ -84,14 +84,7 @@ ynh_add_nginx_config "nextclouddomain"
#================================================= #=================================================
ynh_print_info "Upgrading dependencies..." ynh_print_info "Upgrading dependencies..."
ynh_install_app_dependencies postgresql libstdc++6 redis-server rabbitmq-server ynh_install_app_dependencies postgresql libstdc++6 redis-server rabbitmq-server nodejs
#=================================================
# UPGRADE NODEJS
#=================================================
ynh_print_info "Upgrading nodejs..."
curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
#================================================= #=================================================
# UPGRADE ONLYOFFICE # UPGRADE ONLYOFFICE