From bd327011dc3c3bcff9e9b9830d738b6b26f88676 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@robotics.uk.to>
Date: Sat, 12 Mar 2016 14:26:21 +0000
Subject: [PATCH] Set installed flag

---
 src/freedombone | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/freedombone b/src/freedombone
index d2411a4b..052015c1 100755
--- a/src/freedombone
+++ b/src/freedombone
@@ -6560,8 +6560,10 @@ function upgrade_owncloud_finish {
         sed -i "s|'dbuser'.*|'dbuser' => '$OWNCLOUD_DBUSER',|g" $OWNCLOUD_PATH/config/config.php
         sed -i "s|'dbpassword'.*|'dbpassword' => '$OWNCLOUD_DBPASS',|g" $OWNCLOUD_PATH/config/config.php
         sed -i "s|'secret'.*|'secret' => '$OWNCLOUD_SECRET',|g" $OWNCLOUD_PATH/config/config.php
+        sed -i "s|'installed'.*|'secret' => true,|g" $OWNCLOUD_PATH/config/config.php
     fi
 
+    cp $OWNCLOUD_PATH/config/config.php $OWNCLOUD_PATH/config/config.upgrade
     chown root:root $OWNCLOUD_PATH/config/config.php
 
     # re-index the files
@@ -6922,6 +6924,7 @@ function install_owncloud_official_deb {
         sed -i "s|'dbuser'.*|'dbuser' => '$OWNCLOUD_DBUSER',|g" $OWNCLOUD_PATH/config/config.php
         sed -i "s|'dbpassword'.*|'dbpassword' => '$OWNCLOUD_DBPASS',|g" $OWNCLOUD_PATH/config/config.php
         sed -i "s|'mail_domain'.*|'mail_domain' => '$DEFAULT_DOMAIN_NAME',|g" $OWNCLOUD_PATH/config/config.php
+        sed -i "s|'installed'.*|'secret' => true,|g" $OWNCLOUD_PATH/config/config.php
     fi
 
     echo 'install_owncloud_official_deb' >> $COMPLETION_FILE