1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/galette_ynh.git synced 2024-09-03 18:36:28 +02:00
This commit is contained in:
ericgaspar 2021-07-23 07:10:47 +02:00
parent 96a18b623b
commit 748a561b33
5 changed files with 8 additions and 7 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View file

@ -2,7 +2,6 @@
; Manifest
domain="domain.tld"
path="/path"
admin="john"
is_public=1
password="strong-password"
; Checks
@ -13,7 +12,7 @@
setup_private=1
setup_public=1
upgrade=1
#upgrade=1 from_commit=65cd8b542310e8b349107ed222fdc57e3c2d239a
#upgrade=1 from_commit=
backup_restore=1
multi_instance=1
change_url=0
@ -21,6 +20,6 @@
Email=jean-baptiste@holcroft.fr
Notification=all
;;; Upgrade options
; commit=65cd8b542310e8b349107ed222fdc57e3c2d239a
name=Upgrade from 0.9.1.2
; commit=
name=
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1

View file

@ -49,6 +49,7 @@ test ! -d $final_path \
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================

View file

@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
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)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
timezone="$(cat /etc/timezone)"
@ -52,19 +53,19 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=2
# If db_name doesn't exist, create it
if [ -z "$db_name" ]; then
db_name=$(ynh_sanitize_dbid "$app")
ynh_app_setting_set "$app" db_name "$db_name"
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
fi
# If db_name doesn't exist, create it
if [ -z "$db_pwd" ]; then
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
ynh_app_setting_set "$app" psqlpwd "$db_pwd"
ynh_app_setting_set --app=$app --key=psqlpwd --value=$db_pwd
fi
# If final_path doesn't exist, create it
if [ -z "$final_path" ]; then
final_path="/var/www/$app"
ynh_app_setting_set "$app" final_path "$final_path"
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi
# Cleaning legacy permissions