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