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:40:29 +02:00
parent ab39a4a5e2
commit 5624b22dc5

View file

@ -36,7 +36,6 @@ 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)
echo "$tmp_data_backup"
rsync -a $install_dir/data/ $tmp_data_backup/
#=================================================
@ -48,7 +47,7 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=5
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="association.sqlite data config.local.user.php" --full_replace=1
ynh_setup_source --dest_dir="$install_dir" --keep="config.local.user.php" --full_replace=1
fi
chmod -R o-rwx "$install_dir"
@ -114,7 +113,7 @@ ynh_local_curl "/index.php"
sleep 5
# remove data directory backup
ynh_secure_remove --file="/var/www/$tmp_data_backup"
ynh_secure_remove --file="$tmp_data_backup"
#=================================================
# END OF SCRIPT