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

Fix install/upgrade

This commit is contained in:
Josué Tille 2020-11-28 17:31:42 +01:00
parent 14e6122129
commit c1bee3ddc9
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
6 changed files with 11 additions and 8 deletions

View file

@ -1,6 +1,6 @@
location __PATH__ {
include uwsgi_params;
uwsgi_pass unix:///var/run/__NAME__/app.socket;
uwsgi_pass unix:///run/__NAME__/app.socket;
uwsgi_read_timeout 180;
uwsgi_send_timeout 180;

View file

@ -8,12 +8,6 @@ pgadmin_user="pgadmin"
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"
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
#=================================================

View file

@ -19,6 +19,9 @@ ynh_script_progression --message="Loading installation settings..."
final_path=$(ynh_app_setting_get --app $app --key final_path)
domain=$(ynh_app_setting_get --app $app --key domain)
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

View file

@ -17,7 +17,7 @@ After=syslog.target
RuntimeDirectory=%i
ExecStart=/usr/bin/uwsgi \
--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
User=%i
Group=www-data

View file

@ -22,6 +22,9 @@ path_url=$(ynh_normalize_url_path --path_url $YNH_APP_ARG_PATH)
admin=$YNH_APP_ARG_ADMIN
db_user="pgadmin"
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
test ! -e "$final_path" || ynh_die --message "This path already contains a folder"

View file

@ -19,6 +19,9 @@ ynh_script_progression --message="Loading installation settings..."
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))
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
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=10