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:
parent
b01a4a4da6
commit
c0f8b5a439
1 changed files with 11 additions and 1 deletions
|
@ -42,7 +42,7 @@ if [[ -f "$install_dir/config.local.user.php" ]]; then
|
||||||
cp -a $install_dir/config.local.user.php $tmp_data_backup/
|
cp -a $install_dir/config.local.user.php $tmp_data_backup/
|
||||||
fi
|
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"
|
ynh_replace_string --match_string="namespace Garradin;" --replace_string="namespace Paheko;" --target_file="$tmp_data_backup/config.local.user.php"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -130,6 +130,16 @@ sleep 5
|
||||||
# remove data directory backup
|
# remove data directory backup
|
||||||
ynh_secure_remove --file="$tmp_data_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
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue