mirror of
https://github.com/YunoHost-Apps/tinyfilemanager_ynh.git
synced 2024-09-03 20:36:01 +02:00
Update restore
This commit is contained in:
parent
415cf5eb87
commit
4b4ce4163e
1 changed files with 10 additions and 13 deletions
|
@ -34,11 +34,8 @@ 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_user=$db_name
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
# datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
|
||||||
password=$(ynh_app_setting_get --app=$app --key=password)
|
|
||||||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
|
||||||
language=$(ynh_app_setting_get --app=$app --key=language)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE RESTORED
|
# CHECK IF THE APP CAN BE RESTORED
|
||||||
|
@ -85,11 +82,11 @@ chown -R $app:www-data "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE DATA DIRECTORY
|
# RESTORE THE DATA DIRECTORY
|
||||||
#=================================================
|
#=================================================
|
||||||
# ynh_script_progression --message="Restoring the data directory..." --time --weight=1
|
ynh_script_progression --message="Restoring the data directory..." --time --weight=1
|
||||||
|
|
||||||
# ynh_restore_file --origin_path="$datadir" --not_mandatory
|
ynh_restore_file --origin_path="$datadir" --not_mandatory
|
||||||
|
|
||||||
# mkdir -p $datadir
|
mkdir -p $datadir
|
||||||
|
|
||||||
# FIXME: this should be managed by the core in the future
|
# FIXME: this should be managed by the core in the future
|
||||||
# Here, as a packager, you may have to tweak the ownerhsip/permissions
|
# Here, as a packager, you may have to tweak the ownerhsip/permissions
|
||||||
|
@ -97,9 +94,9 @@ chown -R $app:www-data "$final_path"
|
||||||
# files in some cases.
|
# files in some cases.
|
||||||
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
|
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
|
||||||
# this will be treated as a security issue.
|
# this will be treated as a security issue.
|
||||||
# chmod 750 "$datadir"
|
chmod 750 "$datadir"
|
||||||
# chmod -R o-rwx "$datadir"
|
chmod -R o-rwx "$datadir"
|
||||||
# chown -R $app:www-data "$datadir"
|
chown -R $app:www-data "$datadir"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -157,9 +154,9 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE LOGROTATE CONFIGURATION
|
# RESTORE THE LOGROTATE CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the logrotate configuration..." --time --weight=1
|
# ynh_script_progression --message="Restoring the logrotate configuration..." --time --weight=1
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
# ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
|
|
Loading…
Add table
Reference in a new issue