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

secure remove unused files

This commit is contained in:
rodinux 2023-09-20 19:59:26 +02:00
parent b01a4a4da6
commit c0f8b5a439

View file

@ -42,7 +42,7 @@ if [[ -f "$install_dir/config.local.user.php" ]]; then
cp -a $install_dir/config.local.user.php $tmp_data_backup/
fi
if [[ $(grep "Garradin" $tmp_data_backup/config.local.user.php) ]] ; then
if [[ $(grep "Garradin" "$tmp_data_backup/config.local.user.php") ]] ; then
ynh_replace_string --match_string="namespace Garradin;" --replace_string="namespace Paheko;" --target_file="$tmp_data_backup/config.local.user.php"
fi
@ -130,6 +130,16 @@ sleep 5
# remove data directory backup
ynh_secure_remove --file="$tmp_data_backup"
# clean duplicate folder if exist
if [[ -d "$install_dir/data/data" ]]; then
ynh_secure_remove --file="$install_dir/data/data"
fi
# clean unused file if exist
if [[ -f "$install_dir/config.local.user.php" ]]; then
ynh_secure_remove --file="$install_dir/config.local.user.php"
fi
#=================================================
# END OF SCRIPT
#=================================================