mirror of
https://github.com/YunoHost-Apps/ergo_ynh.git
synced 2024-09-03 18:26:31 +02:00
fix
This commit is contained in:
parent
2427d77484
commit
53d17a5e46
3 changed files with 15 additions and 0 deletions
|
@ -29,6 +29,7 @@ ynh_print_info --message="Loading installation settings..."
|
|||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
final_path_www=$(ynh_app_setting_get --app=$app --key=final_path_www)
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
|
||||
|
@ -43,6 +44,8 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
|
||||
ynh_backup --src_path="$final_path"
|
||||
|
||||
ynh_backup --src_path="$final_path_www"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -22,6 +22,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
secure_port=$(ynh_app_setting_get --app=$app --key=secure_port)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
final_path_www=$(ynh_app_setting_get --app=$app --key=final_path_www)
|
||||
|
||||
#=================================================
|
||||
# STANDARD REMOVE
|
||||
|
@ -60,6 +61,8 @@ ynh_script_progression --message="Removing app main directory..." --weight=1
|
|||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
||||
ynh_secure_remove --file="$final_path_www"
|
||||
|
||||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -31,6 +31,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
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)
|
||||
final_path_www=$(ynh_app_setting_get --app=$app --key=final_path_www)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
|
@ -40,6 +41,9 @@ ynh_script_progression --message="Validating restoration parameters..." --weight
|
|||
test ! -d $final_path \
|
||||
|| ynh_die --message="There is already a directory: $final_path "
|
||||
|
||||
test ! -d $final_path_www \
|
||||
|| ynh_die --message="There is already a directory: $final_path_www "
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
|
@ -63,11 +67,16 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
|
|||
ynh_script_progression --message="Restoring the app main directory..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
ynh_restore_file --origin_path="$final_path_www"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
chmod 750 "$final_path_www"
|
||||
chmod -R o-rwx "$final_path_www"
|
||||
chown -R $app:www-data "$final_path_www"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue