From ead4114aed773cb9d8e86f4031df6416dbaa82b9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 23 May 2019 22:51:00 +0200 Subject: [PATCH] Fix package_linter error --- scripts/install | 2 +- scripts/remove | 4 ++-- scripts/upgrade | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 1109e16..9bc4f45 100755 --- a/scripts/install +++ b/scripts/install @@ -23,7 +23,7 @@ ynh_webpath_register $app $domain $path # Copy files to the right place version=$(cat upstream_version) final_path=/var/www/$app -sudo rm -rf $final_path +sudo ynh_secure_remove --file=$final_path sudo mkdir -p $final_path echo "Downloading phpLDAPadmin $version..." sudo wget -O ../phpLDAPadmin.tar.gz http://sourceforge.net/projects/phpldapadmin/files/phpldapadmin-php%35/$version/phpldapadmin-$version.tgz/download > /dev/null 2>&1 diff --git a/scripts/remove b/scripts/remove index 63a119a..2dacaf5 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,7 +12,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get "$app" domain) # Remove conf and app -sudo rm -rf /var/www/phpldapadmin -sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf +sudo ynh_secure_remove --file=/var/www/phpldapadmin +sudo ynh_secure_remove --file=/etc/nginx/conf.d/$domain.d/$app.conf sudo service nginx reload diff --git a/scripts/upgrade b/scripts/upgrade index 226b7da..b29f25c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,7 @@ path=$(ynh_normalize_url_path $path) # Copy files to the right place version=$(cat upstream_version) final_path=/var/www/$app -sudo rm -rf $final_path +sudo ynh_secure_remove --file=$final_path sudo mkdir -p $final_path echo "Downloading phpLDAPadmin $version..." sudo wget -O ../phpLDAPadmin.tar.gz http://sourceforge.net/projects/phpldapadmin/files/phpldapadmin-php%35/$version/phpldapadmin-$version.tgz/download > /dev/null 2>&1