mirror of
https://github.com/YunoHost-Apps/pgadmin_ynh.git
synced 2024-09-03 19:56:38 +02:00
Merge branch 'testing' into master
This commit is contained in:
commit
20f58f150f
13 changed files with 66 additions and 57 deletions
|
@ -12,12 +12,12 @@ Overview
|
||||||
|
|
||||||
pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL.
|
pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL.
|
||||||
|
|
||||||
**Shipped version:** 4-4.25
|
**Shipped version:** 4-4.28
|
||||||
|
|
||||||
Screenshots
|
Screenshots
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
![](https://www.pgadmin.org/static/img/screenshots/pgadmin4-welcome.png)
|
![](https://www.pgadmin.org/static/COMPILED/assets/img/screenshots/pgadmin4-welcome-light.png)
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.25/pgadmin_4-4.25-buster-bin1_armv7l.tar.gz
|
SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.28/pgadmin_4-4.28-buster-bin1_armv7l.tar.gz
|
||||||
SOURCE_SUM=1ae1e3d6ec1343c86808cfc578066d56b22a72d7967ca8dbf0fb85ddfd495142
|
SOURCE_SUM=631919aadf076649365df7040c0b51fb5c8aaf45c9770613a38ccb392caea39a
|
||||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
||||||
# default: sha256
|
# default: sha256
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.25/pgadmin_4-4.25-stretch-bin1_armv7l.tar.gz
|
SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.28/pgadmin_4-4.28-stretch-bin1_armv7l.tar.gz
|
||||||
SOURCE_SUM=283bf536c761644e330f4885d7c19be8eb665d6fc01503486690f1f3c97f2841
|
SOURCE_SUM=f9c786137c9f401e20f738737c12c02ae4f8d645b80544c78752ecba1a5f280d
|
||||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
||||||
# default: sha256
|
# default: sha256
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
location __PATH__ {
|
location __PATH__ {
|
||||||
include uwsgi_params;
|
include uwsgi_params;
|
||||||
uwsgi_pass unix:///var/run/__NAME__/app.socket;
|
uwsgi_pass unix:///run/__NAME__/app.socket;
|
||||||
|
|
||||||
uwsgi_read_timeout 180;
|
uwsgi_read_timeout 180;
|
||||||
uwsgi_send_timeout 180;
|
uwsgi_send_timeout 180;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Manage PostgreSQL databases over the web",
|
"en": "Manage PostgreSQL databases over the web",
|
||||||
"fr": "Application web de gestion des bases de données PostgreSQL"
|
"fr": "Application web de gestion des bases de données PostgreSQL"
|
||||||
},
|
},
|
||||||
"version": "4-4.25~ynh1",
|
"version": "4-4.28~ynh1",
|
||||||
"url": "https://www.pgadmin.org",
|
"url": "https://www.pgadmin.org",
|
||||||
"license": "PostgreSQL",
|
"license": "PostgreSQL",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -4,16 +4,10 @@
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
final_path=/opt/yunohost/$app
|
final_path=/opt/yunohost/$app
|
||||||
pgadmin_user="pgadmin"
|
pgadmin_user="$app"
|
||||||
python_version="$(python3 -V | cut -d' ' -f2 | cut -d. -f1-2)"
|
python_version="$(python3 -V | cut -d' ' -f2 | cut -d. -f1-2)"
|
||||||
dependances="python3-pip build-essential python3-dev python3-venv postgresql uwsgi uwsgi-plugin-python3 expect libpq-dev"
|
dependances="python3-pip build-essential python3-dev python3-venv postgresql uwsgi uwsgi-plugin-python3 expect libpq-dev"
|
||||||
|
|
||||||
if [[ -e "../settings/manifest.json" ]] || [[ -e "../manifest.json" ]]; then
|
|
||||||
APP_VERSION=$(ynh_app_upstream_version)
|
|
||||||
app_main_version=$(echo $APP_VERSION | cut -d'-' -f1)
|
|
||||||
app_sub_version=$(echo $APP_VERSION | cut -d'-' -f2)
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DEFINE ALL COMMON FONCTIONS
|
# DEFINE ALL COMMON FONCTIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -4,21 +4,24 @@
|
||||||
# GENERIC START
|
# GENERIC START
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Import common cmd
|
||||||
|
source ../settings/scripts/experimental_helper.sh
|
||||||
|
source ../settings/scripts/_common.sh
|
||||||
|
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
# Import common cmd
|
|
||||||
source ../settings/scripts/experimental_helper.sh
|
|
||||||
source ../settings/scripts/_common.sh
|
|
||||||
|
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
ynh_script_progression --message="Loading installation settings..."
|
ynh_script_progression --message="Loading installation settings..."
|
||||||
final_path=$(ynh_app_setting_get --app $app --key final_path)
|
final_path=$(ynh_app_setting_get --app $app --key final_path)
|
||||||
domain=$(ynh_app_setting_get --app $app --key domain)
|
domain=$(ynh_app_setting_get --app $app --key domain)
|
||||||
db_name=$(ynh_app_setting_get --app $app --key db_name)
|
db_name=$(ynh_app_setting_get --app $app --key db_name)
|
||||||
|
app_version=$(ynh_app_upstream_version)
|
||||||
|
app_main_version=$(echo $app_version | cut -d'-' -f1)
|
||||||
|
app_sub_version=$(echo $app_version | cut -d'-' -f2)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD BACKUP STEPS
|
# STANDARD BACKUP STEPS
|
||||||
|
|
|
@ -4,16 +4,16 @@
|
||||||
# GENERIC START
|
# GENERIC START
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Import common cmd
|
||||||
|
source ./experimental_helper.sh
|
||||||
|
source ./_common.sh
|
||||||
|
|
||||||
# Source YunoHost helpers
|
# Source YunoHost helpers
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Stop script if errors
|
# Stop script if errors
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
# Import common cmd
|
|
||||||
source ./experimental_helper.sh
|
|
||||||
source ./_common.sh
|
|
||||||
|
|
||||||
# Retrive arguments
|
# Retrive arguments
|
||||||
ynh_script_progression --message="Loading installation settings..."
|
ynh_script_progression --message="Loading installation settings..."
|
||||||
old_domain=$YNH_APP_OLD_DOMAIN
|
old_domain=$YNH_APP_OLD_DOMAIN
|
||||||
|
@ -42,10 +42,9 @@ ynh_add_nginx_config
|
||||||
ynh_add_uwsgi_service 'pgadmin_user python_version'
|
ynh_add_uwsgi_service 'pgadmin_user python_version'
|
||||||
|
|
||||||
# Reload services
|
# Reload services
|
||||||
ynh_script_progression --message="Reloading services..."
|
ynh_script_progression --message="Restarting $app services..." --weight=3
|
||||||
sudo systemctl reload nginx.service
|
|
||||||
ynh_systemd_action --service_name "uwsgi-app@$app.service" --action restart \
|
ynh_systemd_action --service_name "uwsgi-app@$app.service" --action restart \
|
||||||
--line_match "WSGI app 0 \(mountpoint='$path_url'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/pgadmin.log"
|
--line_match "WSGI app 0 \(mountpoint='[/[:alnum:]_-]*'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/$app.log"
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
ynh_script_progression --message="Change of URL completed for $app" --last
|
ynh_script_progression --message="Change of URL completed for $app" --last
|
||||||
|
|
|
@ -6,10 +6,9 @@
|
||||||
#
|
#
|
||||||
# usage: ynh_check_global_uwsgi_config
|
# usage: ynh_check_global_uwsgi_config
|
||||||
ynh_check_global_uwsgi_config () {
|
ynh_check_global_uwsgi_config () {
|
||||||
uwsgi --version || ynh_die --message "You need to add uwsgi (and appropriate plugin) as a dependency"
|
uwsgi --version || ynh_die --message="You need to add uwsgi (and appropriate plugin) as a dependency"
|
||||||
|
|
||||||
cat > /etc/systemd/system/uwsgi-app@.service <<EOF
|
cat > /etc/systemd/system/uwsgi-app@.service <<EOF
|
||||||
[Unit]
|
|
||||||
Description=%i uWSGI app
|
Description=%i uWSGI app
|
||||||
After=syslog.target
|
After=syslog.target
|
||||||
|
|
||||||
|
@ -17,7 +16,7 @@ After=syslog.target
|
||||||
RuntimeDirectory=%i
|
RuntimeDirectory=%i
|
||||||
ExecStart=/usr/bin/uwsgi \
|
ExecStart=/usr/bin/uwsgi \
|
||||||
--ini /etc/uwsgi/apps-available/%i.ini \
|
--ini /etc/uwsgi/apps-available/%i.ini \
|
||||||
--socket /var/run/%i/app.socket \
|
--socket /run/%i/app.socket \
|
||||||
--logto /var/log/uwsgi/%i/%i.log
|
--logto /var/log/uwsgi/%i/%i.log
|
||||||
User=%i
|
User=%i
|
||||||
Group=www-data
|
Group=www-data
|
||||||
|
@ -53,6 +52,10 @@ EOF
|
||||||
# To be able to customise the settings of the systemd unit you can override the rules with the file "conf/uwsgi-app@override.service".
|
# To be able to customise the settings of the systemd unit you can override the rules with the file "conf/uwsgi-app@override.service".
|
||||||
# This file will be automatically placed on the good place
|
# This file will be automatically placed on the good place
|
||||||
#
|
#
|
||||||
|
# Note that the service need to be started manually at the end of the installation.
|
||||||
|
# Generally you can start the service with this command:
|
||||||
|
# ynh_systemd_action --service_name "uwsgi-app@$app.service" --line_match "WSGI app 0 \(mountpoint='[/[:alnum:]_-]*'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/$app.log"
|
||||||
|
#
|
||||||
# usage: ynh_add_uwsgi_service
|
# usage: ynh_add_uwsgi_service
|
||||||
#
|
#
|
||||||
# to interact with your service: `systemctl <action> uwsgi-app@app`
|
# to interact with your service: `systemctl <action> uwsgi-app@app`
|
||||||
|
@ -63,21 +66,21 @@ ynh_add_uwsgi_service () {
|
||||||
local finaluwsgiini="/etc/uwsgi/apps-available/$app.ini"
|
local finaluwsgiini="/etc/uwsgi/apps-available/$app.ini"
|
||||||
|
|
||||||
# www-data group is needed since it is this nginx who will start the service
|
# www-data group is needed since it is this nginx who will start the service
|
||||||
usermod --append --groups www-data "$app" || ynh_die --message "It wasn't possible to add user $app to group www-data"
|
usermod --append --groups www-data "$app" || ynh_die --message="It wasn't possible to add user $app to group www-data"
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different "$finaluwsgiini"
|
ynh_backup_if_checksum_is_different --file="$finaluwsgiini"
|
||||||
cp ../conf/uwsgi.ini "$finaluwsgiini"
|
cp ../conf/uwsgi.ini "$finaluwsgiini"
|
||||||
|
|
||||||
# To avoid a break by set -u, use a void substitution ${var:-}. If the variable is not set, it's simply set with an empty variable.
|
# To avoid a break by set -u, use a void substitution ${var:-}. If the variable is not set, it's simply set with an empty variable.
|
||||||
# Substitute in a nginx config file only if the variable is not empty
|
# Substitute in a nginx config file only if the variable is not empty
|
||||||
if test -n "${final_path:-}"; then
|
if test -n "${final_path:-}"; then
|
||||||
ynh_replace_string --match_string "__FINALPATH__" --replace_string "$final_path" --target_file "$finaluwsgiini"
|
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$finaluwsgiini"
|
||||||
fi
|
fi
|
||||||
if test -n "${path_url:-}"; then
|
if test -n "${path_url:-}"; then
|
||||||
ynh_replace_string --match_string "__PATH__" --replace_string "$path_url" --target_file "$finaluwsgiini"
|
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$finaluwsgiini"
|
||||||
fi
|
fi
|
||||||
if test -n "${app:-}"; then
|
if test -n "${app:-}"; then
|
||||||
ynh_replace_string --match_string "__APP__" --replace_string "$app" --target_file "$finaluwsgiini"
|
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$finaluwsgiini"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Replace all other variable given as arguments
|
# Replace all other variable given as arguments
|
||||||
|
@ -85,10 +88,10 @@ ynh_add_uwsgi_service () {
|
||||||
do
|
do
|
||||||
# ${var_to_replace^^} make the content of the variable on upper-cases
|
# ${var_to_replace^^} make the content of the variable on upper-cases
|
||||||
# ${!var_to_replace} get the content of the variable named $var_to_replace
|
# ${!var_to_replace} get the content of the variable named $var_to_replace
|
||||||
ynh_replace_string --match_string "__${var_to_replace^^}__" --replace_string "${!var_to_replace}" --target_file "$finaluwsgiini"
|
ynh_replace_string --match_string="__${var_to_replace^^}__" --replace_string="${!var_to_replace}" --target_file="$finaluwsgiini"
|
||||||
done
|
done
|
||||||
|
|
||||||
ynh_store_file_checksum --file "$finaluwsgiini"
|
ynh_store_file_checksum --file="$finaluwsgiini"
|
||||||
|
|
||||||
chown $app:root "$finaluwsgiini"
|
chown $app:root "$finaluwsgiini"
|
||||||
|
|
||||||
|
@ -115,8 +118,9 @@ ynh_add_uwsgi_service () {
|
||||||
ynh_remove_uwsgi_service () {
|
ynh_remove_uwsgi_service () {
|
||||||
local finaluwsgiini="/etc/uwsgi/apps-available/$app.ini"
|
local finaluwsgiini="/etc/uwsgi/apps-available/$app.ini"
|
||||||
if [ -e "$finaluwsgiini" ]; then
|
if [ -e "$finaluwsgiini" ]; then
|
||||||
systemctl disable "uwsgi-app@$app.service"
|
|
||||||
yunohost service remove "uwsgi-app@$app"
|
yunohost service remove "uwsgi-app@$app"
|
||||||
|
systemctl stop "uwsgi-app@$app.service"
|
||||||
|
systemctl disable "uwsgi-app@$app.service"
|
||||||
|
|
||||||
ynh_secure_remove --file="$finaluwsgiini"
|
ynh_secure_remove --file="$finaluwsgiini"
|
||||||
ynh_secure_remove --file="/var/log/uwsgi/$app"
|
ynh_secure_remove --file="/var/log/uwsgi/$app"
|
||||||
|
|
|
@ -4,16 +4,16 @@
|
||||||
# GENERIC START
|
# GENERIC START
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Import common cmd
|
||||||
|
source ./experimental_helper.sh
|
||||||
|
source ./_common.sh
|
||||||
|
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
# Import common cmd
|
|
||||||
source ./experimental_helper.sh
|
|
||||||
source ./_common.sh
|
|
||||||
|
|
||||||
ynh_script_progression --message="Validating installation parameters..."
|
ynh_script_progression --message="Validating installation parameters..."
|
||||||
|
|
||||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||||
|
@ -22,6 +22,9 @@ path_url=$(ynh_normalize_url_path --path_url $YNH_APP_ARG_PATH)
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
db_user="pgadmin"
|
db_user="pgadmin"
|
||||||
admin_pwd=$YNH_APP_ARG_ADMIN_PASSWORD
|
admin_pwd=$YNH_APP_ARG_ADMIN_PASSWORD
|
||||||
|
app_version=$(ynh_app_upstream_version)
|
||||||
|
app_main_version=$(echo $app_version | cut -d'-' -f1)
|
||||||
|
app_sub_version=$(echo $app_version | cut -d'-' -f2)
|
||||||
|
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||||
test ! -e "$final_path" || ynh_die --message "This path already contains a folder"
|
test ! -e "$final_path" || ynh_die --message "This path already contains a folder"
|
||||||
|
@ -118,9 +121,9 @@ ynh_script_progression --message="Configuring log rotation..."
|
||||||
ynh_use_logrotate --logfile /var/log/pgadmin
|
ynh_use_logrotate --logfile /var/log/pgadmin
|
||||||
|
|
||||||
# reload uwsgi
|
# reload uwsgi
|
||||||
ynh_script_progression --message="Starting pgadmin services..." --weight=3
|
ynh_script_progression --message="Starting $app services..." --weight=3
|
||||||
ynh_systemd_action --service_name "uwsgi-app@$app.service" \
|
ynh_systemd_action --service_name "uwsgi-app@$app.service" \
|
||||||
--line_match "WSGI app 0 \(mountpoint='$path_url'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/pgadmin.log"
|
--line_match "WSGI app 0 \(mountpoint='[/[:alnum:]_-]*'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/$app.log"
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
ynh_script_progression --message="Installation of $app completed" --last
|
ynh_script_progression --message="Installation of $app completed" --last
|
||||||
|
|
|
@ -4,9 +4,6 @@
|
||||||
# GENERIC START
|
# GENERIC START
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Source YunoHost helpers
|
|
||||||
source /usr/share/yunohost/helpers
|
|
||||||
|
|
||||||
# Stop script if errors
|
# Stop script if errors
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
|
@ -14,6 +11,9 @@ set -u
|
||||||
source ./experimental_helper.sh
|
source ./experimental_helper.sh
|
||||||
source ./_common.sh
|
source ./_common.sh
|
||||||
|
|
||||||
|
# Source YunoHost helpers
|
||||||
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
ynh_script_progression --message="Loading installation settings..."
|
ynh_script_progression --message="Loading installation settings..."
|
||||||
domain=$(ynh_app_setting_get --app $app --key domain)
|
domain=$(ynh_app_setting_get --app $app --key domain)
|
||||||
|
|
|
@ -4,16 +4,16 @@
|
||||||
# GENERIC START
|
# GENERIC START
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Import common cmd
|
||||||
|
source ../settings/scripts/experimental_helper.sh
|
||||||
|
source ../settings/scripts/_common.sh
|
||||||
|
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
# Import common cmd
|
|
||||||
source ../settings/scripts/experimental_helper.sh
|
|
||||||
source ../settings/scripts/_common.sh
|
|
||||||
|
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
ynh_script_progression --message="Loading settings..."
|
ynh_script_progression --message="Loading settings..."
|
||||||
domain=$(ynh_app_setting_get --app $app --key domain)
|
domain=$(ynh_app_setting_get --app $app --key domain)
|
||||||
|
@ -23,6 +23,9 @@ final_path=$(ynh_app_setting_get --app $app --key final_path)
|
||||||
db_name=$(ynh_app_setting_get --app $app --key db_name)
|
db_name=$(ynh_app_setting_get --app $app --key db_name)
|
||||||
db_user=$(ynh_app_setting_get --app $app --key db_user)
|
db_user=$(ynh_app_setting_get --app $app --key db_user)
|
||||||
db_pwd=$(ynh_app_setting_get --app $app --key db_pwd)
|
db_pwd=$(ynh_app_setting_get --app $app --key db_pwd)
|
||||||
|
app_version=$(ynh_app_upstream_version)
|
||||||
|
app_main_version=$(echo $app_version | cut -d'-' -f1)
|
||||||
|
app_sub_version=$(echo $app_version | cut -d'-' -f2)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD RESTORATION STEPS
|
# STANDARD RESTORATION STEPS
|
||||||
|
@ -74,7 +77,7 @@ ynh_use_logrotate --logfile /var/log/pgadmin
|
||||||
# reload uwsgi and nginx
|
# reload uwsgi and nginx
|
||||||
ynh_script_progression --message="Starting pgadmin services..." --weight=3
|
ynh_script_progression --message="Starting pgadmin services..." --weight=3
|
||||||
ynh_systemd_action --service_name "uwsgi-app@$app.service" \
|
ynh_systemd_action --service_name "uwsgi-app@$app.service" \
|
||||||
--line_match "WSGI app 0 \(mountpoint='$path_url'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/pgadmin.log"
|
--line_match "WSGI app 0 \(mountpoint='[/[:alnum:]_-]*'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/$app.log"
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
|
|
|
@ -4,21 +4,24 @@
|
||||||
# GENERIC START
|
# GENERIC START
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Import common cmd
|
||||||
|
source ./experimental_helper.sh
|
||||||
|
source ./_common.sh
|
||||||
|
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
# Import common cmd
|
|
||||||
source ./experimental_helper.sh
|
|
||||||
source ./_common.sh
|
|
||||||
|
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
ynh_script_progression --message="Loading installation settings..."
|
ynh_script_progression --message="Loading installation settings..."
|
||||||
domain=$(ynh_app_setting_get --app $app --key domain)
|
domain=$(ynh_app_setting_get --app $app --key domain)
|
||||||
path_url=$(ynh_normalize_url_path --path_url $(ynh_app_setting_get --app $app --key path))
|
path_url=$(ynh_normalize_url_path --path_url $(ynh_app_setting_get --app $app --key path))
|
||||||
admin=$(ynh_app_setting_get --app $app --key admin)
|
admin=$(ynh_app_setting_get --app $app --key admin)
|
||||||
|
app_version=$(ynh_app_upstream_version)
|
||||||
|
app_main_version=$(echo $app_version | cut -d'-' -f1)
|
||||||
|
app_sub_version=$(echo $app_version | cut -d'-' -f2)
|
||||||
|
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=10
|
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=10
|
||||||
|
@ -68,9 +71,9 @@ ynh_script_progression --message="Configuring log rotation..."
|
||||||
ynh_use_logrotate --logfile /var/log/pgadmin --nonappend
|
ynh_use_logrotate --logfile /var/log/pgadmin --nonappend
|
||||||
|
|
||||||
# reload uwsgi
|
# reload uwsgi
|
||||||
ynh_script_progression --message="Restarting pgadmin services..." --weight=3
|
ynh_script_progression --message="Restarting $app services..." --weight=3
|
||||||
ynh_systemd_action --service_name "uwsgi-app@$app.service" \
|
ynh_systemd_action --service_name "uwsgi-app@$app.service" \
|
||||||
--line_match "WSGI app 0 \(mountpoint='$path_url'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/pgadmin.log"
|
--line_match "WSGI app 0 \(mountpoint='[/[:alnum:]_-]*'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/$app.log"
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
ynh_script_progression --message="Upgrade of $app completed" --last
|
ynh_script_progression --message="Upgrade of $app completed" --last
|
||||||
|
|
Loading…
Reference in a new issue