From 76e8cd986b6fb1941317e1257f8b6ba16378ea09 Mon Sep 17 00:00:00 2001 From: Moul Date: Thu, 5 Mar 2020 20:33:21 +0100 Subject: [PATCH] [mod] Use ynh_secure_remove instead of 'rm -rf' as suggested by the linter --- scripts/remove | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/remove b/scripts/remove index 00a0c3f..a31dfb3 100755 --- a/scripts/remove +++ b/scripts/remove @@ -8,7 +8,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get "$app" domain) # Remove sources -rm -rf /var/www/$app +ynh_secure_remove /var/www/$app # Remove configuration files rm -f /etc/nginx/conf.d/$domain.d/$app.conf diff --git a/scripts/upgrade b/scripts/upgrade index 7aa7b9c..a353afd 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,7 +27,7 @@ path=${path%/} src_path=/var/www/$app if [ "$upgrade_type" == "UPGRADE_APP" ] then - rm -rf $src_path + ynh_secure_remove $src_path mkdir -p $src_path ynh_script_progression --message="Upgrading source files..." --time --weight=1