tweak pre-start

This commit is contained in:
nmfretz committed 2024-04-05 13:21:23 -07:00
1 parent 471531e015
commit 417682ea28
1 file changed
+7 -3
+7 -3
View File
@@ -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