From 6e02f545043915c530375aa22bab955218b38a65 Mon Sep 17 00:00:00 2001
From: Chris Guida <chrisguida@gmail.com>
Date: Fri, 3 Jun 2022 14:49:29 -0500
Subject: [PATCH] don't autoreindex when there was no previous config

---
 assets/compat/config-set.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/assets/compat/config-set.sh b/assets/compat/config-set.sh
index c8dc9f11..6b6d69ef 100755
--- a/assets/compat/config-set.sh
+++ b/assets/compat/config-set.sh
@@ -22,7 +22,8 @@ then
 fi
 
 # if the old prune config was disabled, no action required
-if [ "$OLD_PRUNING_TL" = "disabled" ]
+# also do nothing if there was no previous config. this allows bootstrapping a pruned node from a non-embassy-os source such as prunednode.today
+if [ "$OLD_PRUNING_TL" = "disabled" ] || [ -z "$OLD_PRUNING_TL" ]
 then
     >&2 echo No reindex required
 # if they are the same, and the new prune cache size is reduced, no action required
@@ -33,4 +34,4 @@ else
     >&2 echo Reindex required
     touch $DATA_DIR/requires.reindex
 fi
-echo "$COMPAT_RES"
\ No newline at end of file
+echo "$COMPAT_RES"