diff --git a/scripts/remove b/scripts/remove index f3f4f59..c040eff 100755 --- a/scripts/remove +++ b/scripts/remove @@ -69,12 +69,15 @@ ynh_script_progression --message="Removing app main directory..." --weight=1 ynh_secure_remove --file="$final_path" #================================================= -# REMOVE APP DATA DIR +# REMOVE DATA DIR #================================================= -ynh_script_progression --message="Removing app data directory..." --weight=1 -# Remove the app directory securely -ynh_secure_remove --file="$data_path" +# Remove the data directory if --purge option is used +if [ "${YNH_APP_PURGE:-0}" -eq 1 ] +then + ynh_script_progression --message="Removing app data directory..." --time --weight=1 + ynh_secure_remove --file="$data_path" +fi #================================================= # REMOVE NGINX CONFIGURATION