mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Update restore
This commit is contained in:
parent
2efa3bf776
commit
825e67001f
1 changed files with 2 additions and 4 deletions
|
@ -71,8 +71,6 @@ ynh_script_progression --message="Restoring data directory..." --weight=2
|
||||||
# Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup.
|
# Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup.
|
||||||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||||
|
|
||||||
chown -R $app:www-data "$data_dir"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE USER RIGHTS
|
# RESTORE USER RIGHTS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -91,7 +89,7 @@ chmod 750 $install_dir
|
||||||
# Iterate over users to extend their home folder permissions - for the external
|
# Iterate over users to extend their home folder permissions - for the external
|
||||||
# storage plugin usage - and create relevant Nextcloud directories
|
# storage plugin usage - and create relevant Nextcloud directories
|
||||||
for u in $(ynh_user_list); do
|
for u in $(ynh_user_list); do
|
||||||
mkdir -p "$data_dir/data/$u"
|
mkdir -p "$data_dir/$u"
|
||||||
setfacl --modify g:$app:rwx "/home/$u" || true
|
setfacl --modify g:$app:rwx "/home/$u" || true
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -114,7 +112,7 @@ ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
|
||||||
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
|
||||||
|
|
||||||
# Make sure a log file exists (mostly for CI tests)
|
# Make sure a log file exists (mostly for CI tests)
|
||||||
logfile="/home/yunohost.app/$app/data/nextcloud.log"
|
logfile="$data_dir/data/nextcloud.log"
|
||||||
if [ ! -f "$logfile" ]; then
|
if [ ! -f "$logfile" ]; then
|
||||||
touch "$logfile"
|
touch "$logfile"
|
||||||
chown $app: "$logfile"
|
chown $app: "$logfile"
|
||||||
|
|
Loading…
Add table
Reference in a new issue