1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dendrite_ynh.git synced 2024-09-03 18:25:58 +02:00

fix psql_version not defined

This commit is contained in:
Éric Gaspar 2023-02-19 11:59:49 +01:00
parent b74e1c5c60
commit 5961390b0c
2 changed files with 10 additions and 4 deletions

View file

@ -31,6 +31,8 @@ registration=$YNH_APP_ARG_REGISTRATION
app=$YNH_APP_INSTANCE_NAME
psql_version=$PSQL_VERSION
# Allow or deny registration based on is_public
if [ $registration -eq 1 ]
then
@ -61,6 +63,7 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=server_name --value=$server_name
ynh_app_setting_set --app=$app --key=registration --value=$registration
ynh_app_setting_set --app=$app --key=psql_version --value=$psql_version
#=================================================
# STANDARD MODIFICATIONS
@ -182,8 +185,6 @@ chown $app:$app "$final_path/dendrite.yaml"
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1
psql_version=$PSQL_VERSION
# Create a dedicated systemd config
ynh_add_systemd_config

View file

@ -27,6 +27,7 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
registration=$(ynh_app_setting_get --app=$app --key=registration)
psql_version=$PSQL_VERSION
#=================================================
# CHECK VERSION
@ -73,6 +74,12 @@ if [ -z $server_name ]; then
ynh_app_setting_set --app=$app --key=server_name --value=$domain
fi
# Define $server_name if not already defined
if [ -z $psql_version ]; then
psql_version=$PSQL_VERSION
ynh_app_setting_set --app=$app --key=psql_version --value=$psql_version
fi
# Load up registration variables
if [[ $registration -eq 1 ]]
then
@ -194,8 +201,6 @@ chown $app:$app "$final_path/dendrite.yaml"
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
psql_version=$PSQL_VERSION
# Create a dedicated systemd config
ynh_add_systemd_config