From e671e97c29830eca75782c0f4eac9d9d1ac9f3e1 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@robotics.uk.to>
Date: Thu, 24 Nov 2016 15:43:35 +0000
Subject: [PATCH] Remove on failure

---
 src/freedombone-app-postactiv | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/freedombone-app-postactiv b/src/freedombone-app-postactiv
index 66d38e790..38e3bfb8a 100755
--- a/src/freedombone-app-postactiv
+++ b/src/freedombone-app-postactiv
@@ -533,6 +533,7 @@ function install_postactiv_main {
     # Create the configuration
     postactiv_installer=/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/scripts/install_cli.php
     if [ ! -f $postactiv_installer ]; then
+        rm -rf /var/www/$POSTACTIV_DOMAIN_NAME
         echo $'No postactiv commandline installer found'
         exit 53026
     fi
@@ -555,6 +556,7 @@ function install_postactiv_main {
     # check postactiv has a config file
     postactiv_config_file=/var/www/$POSTACTIV_DOMAIN_NAME/htdocs/config.php
     if [ ! -f $postactiv_config_file ]; then
+        rm -rf /var/www/$POSTACTIV_DOMAIN_NAME
         echo $'Postactiv config.php not found'
         exit 87586
     fi
-- 
GitLab