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
2017-12-23 22:01:03 +01:00

41 lines
899 B
Bash

#!/bin/bash
# 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 ./_common.sh
source ./psql.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
}
# Download, check integrity, uncompress and patch the source from app.src
install_source
# CONFIGURE PGADMIN
config_pgadmin
# Config uwsgi
config_uwsgi
# Set permission after initialisation
set_permission
# Create a dedicated nginx config
ynh_add_nginx_config
# RELOAD NGINX
systemctl reload nginx
systemctl reload uwsgi