From 417682ea286f498cbfb2a37c8afe97508f7de3de Mon Sep 17 00:00:00 2001 From: nmfretz Date: Fri, 5 Apr 2024 13:21:23 -0700 Subject: [PATCH] tweak pre-start --- ordinals/hooks/pre-start | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ordinals/hooks/pre-start b/ordinals/hooks/pre-start index ecb04dd1e..83448c1ba 100755 --- a/ordinals/hooks/pre-start +++ b/ordinals/hooks/pre-start @@ -17,6 +17,7 @@ set_correct_permissions() { fi } +# handle generating the correct ord data dir for pre-0.15.0 versions if [[ -f "${APP_DATA_DIR}/index.redb" ]]; then rm -f "${APP_DATA_DIR}/index.redb" mkdir -p "${ORDINALS_DATA_DIR}" @@ -25,9 +26,12 @@ if [[ -f "${APP_DATA_DIR}/index.redb" ]]; then fi # re-index the ordinals data for runes -if [[ ! -f "${APP_DATA_DIR}/INDEXED_0-17-1" ]]; then - rm -f "${ORDINALS_DATA_DIR}/index.redb" - touch "${APP_DATA_DIR}/INDEXED_0-17-1" +# for installs post 0.17.1 this file will be harmlessly created +if [[ ! -f "${APP_DATA_DIR}/AT_LEAST_0-17-1" ]]; then + if [[ -f "${ORDINALS_DATA_DIR}/index.redb" ]]; then + rm -f "${ORDINALS_DATA_DIR}/index.redb" + fi + touch "${APP_DATA_DIR}/AT_LEAST_0-17-1" fi