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

Cleaning up

This commit is contained in:
ericgaspar 2021-09-18 09:01:08 +02:00
parent a56a99e2cc
commit 3948b9e864
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 18 additions and 29 deletions

View file

@ -1,3 +1,4 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location ^~ __PATH__/ {
proxy_pass http://127.0.0.1:__PORT__/;
proxy_http_version 1.1;

View file

@ -5,7 +5,7 @@
#=================================================
# dependencies used by the app
pkg_dependencies="postgresql postgresql-contrib libstdc++6 redis-server rabbitmq-server libcurl4-dev"
pkg_dependencies="postgresql postgresql-contrib libstdc++6 rabbitmq-server libcurl4-dev"
#=================================================
# PERSONAL HELPERS

View file

@ -103,14 +103,8 @@ ynh_psql_setup_db --db_user=$db_name --db_name=$db_name
#=================================================
ynh_script_progression --message="Configuring NGINX web server..."
if [ $path_url = "/" ]; 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_url" --target_file="../conf/nginx.conf"
fi
# Create a dedicated NGINX config
ynh_add_nginx_config "nextclouddomain"
ynh_add_nginx_config
#=================================================
# SPECIFIC SETUP

View file

@ -24,6 +24,20 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
port=$(ynh_app_setting_get --app=$app --key=port)
nextclouddomain=$(ynh_app_setting_get --app=$app --key=nextclouddomain)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up OnlyOffice before upgrading (may take a while)..."
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
# restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
@ -57,20 +71,6 @@ fi
ynh_secure_remove --file="/etc/apt/sources.list.d/onlyoffice.list"
ynh_secure_remove --file="/etc/apt/sources.list.d/nodesource.list"
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up OnlyOffice before upgrading (may take a while)..."
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
# restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CREATE DEDICATED USER
#=================================================
@ -86,14 +86,8 @@ ynh_system_user_create --username=$app
#=================================================
ynh_script_progression --message="Configuring NGINX web server..."
if [ "$path_url" = "/" ]; 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_url" --target_file="../conf/nginx.conf"
fi
# Create a dedicated nginx config
ynh_add_nginx_config "nextclouddomain"
ynh_add_nginx_config
#=================================================
# UPGRADE DEPENDENCIES