1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/paheko_ynh.git synced 2024-09-03 19:56:22 +02:00

secure temporary directory for data

This commit is contained in:
rodinux 2023-09-18 17:27:41 +02:00
parent 56b6acbd04
commit c1f585851e

View file

@ -36,7 +36,8 @@ ynh_script_progression --message="Backup of the DB in temporary file...." --weig
# copy data directory backup
tmp_data_backup=$(mktemp -d $app_dataXXX --suffix=BKP)
rsync -R $install_dir/data/ /var/www/$tmp_data_backup/
echo "$tmp_data_backup"
rsync -a $install_dir/data/ $tmp_data_backup/
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -89,7 +90,7 @@ ynh_add_config --template="config.local.php" --destination="$install_dir/config.
ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.local.yunohost.php"
# Sync data directory backup
rsync -R /var/www/$tmp_data_backup/ $install_dir/data/
rsync -a /var/www/$tmp_data_backup/ $install_dir/data/
# Permissions on files and directories
chmod -R o-rwx "$install_dir"