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:
parent
14e6122129
commit
c1bee3ddc9
6 changed files with 11 additions and 8 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue