mirror of
https://github.com/YunoHost-Apps/pgadmin_ynh.git
synced 2024-09-03 19:56:38 +02:00
52 lines
1.2 KiB
Bash
52 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
source /usr/share/yunohost/helpers
|
|
|
|
# Exit if an error occurs during the execution of the script
|
|
ynh_abort_if_errors
|
|
|
|
# Import common cmd
|
|
source ./experimental_helper.sh
|
|
source ./_common.sh
|
|
|
|
# LOAD SETTINGS
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
path_url=$(ynh_normalize_url_path $(ynh_app_setting_get $app path))
|
|
admin=$(ynh_app_setting_get $app admin)
|
|
|
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
|
ynh_backup_before_upgrade # Backup the current version of the app
|
|
ynh_clean_setup () {
|
|
ynh_restore_upgradebackup # restore it if the upgrade fails
|
|
}
|
|
|
|
#=================================================
|
|
# STANDARD UPGRADE STEPS
|
|
#=================================================
|
|
|
|
# Download, check integrity, uncompress and patch the source from app.src
|
|
install_source
|
|
|
|
# CONFIGURE PGADMIN
|
|
config_pgadmin
|
|
|
|
# Config uwsgi
|
|
config_uwsgi
|
|
|
|
#=================================================
|
|
# GENERIC FINALIZATION
|
|
#=================================================
|
|
|
|
# Set permission after initialisation
|
|
set_permission
|
|
|
|
# Create a dedicated nginx config
|
|
ynh_add_nginx_config
|
|
|
|
# reload uwsgi
|
|
systemctl restart uwsgi
|