mirror of
https://github.com/YunoHost-Apps/lufi_ynh.git
synced 2024-09-03 19:36:28 +02:00
Fix
This commit is contained in:
parent
721dd51e6f
commit
bfda866a29
3 changed files with 25 additions and 2 deletions
|
@ -30,6 +30,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
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)
|
||||
public_path=$(ynh_app_setting_get --app=$app --key=public_path)
|
||||
|
||||
#=================================================
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
|
@ -42,6 +43,12 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
|
||||
ynh_backup --src_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE DATA DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$public_path" --is_big
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -112,13 +112,16 @@ chown -R $app:www-data "$final_path"
|
|||
#=================================================
|
||||
# CREATE DIRECTORIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating a data directory..."
|
||||
|
||||
public_path=/home/yunohost.app/$app
|
||||
ynh_app_setting_set --app=$app --key=public_path --value=$public_path
|
||||
|
||||
mkdir -p $public_path
|
||||
chown -R $app:www-data $public_path
|
||||
chmod 755 $public_path
|
||||
|
||||
chmod 755 "$public_path"
|
||||
chmod -R o-rwx "$public_path"
|
||||
chown -R $app:www-data "$public_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
|
|
@ -74,6 +74,19 @@ chmod 750 "$final_path"
|
|||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the data directory..."
|
||||
|
||||
ynh_restore_file --origin_path="$public_path" --not_mandatory
|
||||
|
||||
mkdir -p $public_path
|
||||
|
||||
chmod 750 "$public_path"
|
||||
chmod -R o-rwx "$public_path"
|
||||
chown -R $app:www-data "$public_path"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue