mirror of
https://github.com/YunoHost-Apps/galette_ynh.git
synced 2024-09-03 18:36:28 +02:00
FIx
This commit is contained in:
parent
96a18b623b
commit
748a561b33
5 changed files with 8 additions and 7 deletions
BIN
.DS_Store
vendored
Normal file
BIN
.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -2,7 +2,6 @@
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld"
|
domain="domain.tld"
|
||||||
path="/path"
|
path="/path"
|
||||||
admin="john"
|
|
||||||
is_public=1
|
is_public=1
|
||||||
password="strong-password"
|
password="strong-password"
|
||||||
; Checks
|
; Checks
|
||||||
|
@ -13,7 +12,7 @@
|
||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
#upgrade=1 from_commit=65cd8b542310e8b349107ed222fdc57e3c2d239a
|
#upgrade=1 from_commit=
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
change_url=0
|
change_url=0
|
||||||
|
@ -21,6 +20,6 @@
|
||||||
Email=jean-baptiste@holcroft.fr
|
Email=jean-baptiste@holcroft.fr
|
||||||
Notification=all
|
Notification=all
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=65cd8b542310e8b349107ed222fdc57e3c2d239a
|
; commit=
|
||||||
name=Upgrade from 0.9.1.2
|
name=
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1
|
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1
|
||||||
|
|
|
@ -49,6 +49,7 @@ test ! -d $final_path \
|
||||||
# RESTORE THE NGINX CONFIGURATION
|
# RESTORE THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
|
ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
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=$db_name
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
timezone="$(cat /etc/timezone)"
|
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 db_name doesn't exist, create it
|
||||||
if [ -z "$db_name" ]; then
|
if [ -z "$db_name" ]; then
|
||||||
db_name=$(ynh_sanitize_dbid "$app")
|
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
|
fi
|
||||||
|
|
||||||
# If db_name doesn't exist, create it
|
# If db_name doesn't exist, create it
|
||||||
if [ -z "$db_pwd" ]; then
|
if [ -z "$db_pwd" ]; then
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
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
|
fi
|
||||||
|
|
||||||
# If final_path doesn't exist, create it
|
# If final_path doesn't exist, create it
|
||||||
if [ -z "$final_path" ]; then
|
if [ -z "$final_path" ]; then
|
||||||
final_path="/var/www/$app"
|
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
|
fi
|
||||||
|
|
||||||
# Cleaning legacy permissions
|
# Cleaning legacy permissions
|
||||||
|
|
Loading…
Reference in a new issue