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

56 lines
1.3 KiB
Text
Raw Normal View History

2017-11-14 16:05:26 +01:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
2017-11-14 16:05:26 +01:00
# 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
2017-11-14 16:05:26 +01:00
source ./_common.sh
# LOAD SETTINGS
domain=$(ynh_app_setting_get $app domain)
2017-11-16 21:10:21 +01:00
path_url=$(ynh_normalize_url_path $(ynh_app_setting_get $app path))
2017-11-14 16:05:26 +01:00
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
#=================================================
2019-03-21 11:37:52 +01:00
# Install dependance
install_dependance
2017-11-14 16:05:26 +01:00
# Download, check integrity, uncompress and patch the source from app.src
2017-11-16 21:10:21 +01:00
install_source
2017-11-14 16:05:26 +01:00
2017-11-16 21:10:21 +01:00
# CONFIGURE PGADMIN
config_pgadmin
2017-11-14 16:05:26 +01:00
2017-11-16 21:10:21 +01:00
# Config uwsgi
config_uwsgi
2017-11-14 16:05:26 +01:00
#=================================================
# GENERIC FINALIZATION
#=================================================
2017-11-16 21:10:21 +01:00
# Set permission after initialisation
set_permission
2017-11-14 16:05:26 +01:00
2017-11-16 21:10:21 +01:00
# Create a dedicated nginx config
ynh_add_nginx_config
2017-11-14 16:05:26 +01:00
2018-03-15 23:33:57 +01:00
# reload uwsgi
systemctl restart uwsgi