From e25dddecb68814fa526d742655e8b8322a924745 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 23 Sep 2019 21:23:42 +0200 Subject: [PATCH] [enh] clean before install or upgrade --- scripts/install | 1 + scripts/upgrade | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index e766584..7e489cc 100644 --- a/scripts/install +++ b/scripts/install @@ -121,6 +121,7 @@ ynh_install_composer $php_version $final_path # Prepare Flarum temp directory tmp=/tmp/$app +ynh_secure_remove --file="$tmp" mkdir -p $tmp chown -R $app:www-data $tmp chmod -R 0775 $tmp diff --git a/scripts/upgrade b/scripts/upgrade index 74587ba..1c4d34d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -168,6 +168,7 @@ if [[ $(dpkg --compare-versions $old_project_version lt "0.1.0-beta.8" && echo t # Backing up the app directory tmpbak="/tmp/${app}backup" + ynh_secure_remove --file="$tmpbak" mkdir -p $tmpbak cp -R $final_path/* $tmpbak