obuspa: skip db override

This commit is contained in:
Vivek Kumar Dutta 2024-10-02 20:43:29 +05:30
parent ccb40910e2
commit 0dda22833d
2 changed files with 7 additions and 1 deletions

View file

@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=9.0.0.6
PKG_VERSION:=9.0.0.7
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)

View file

@ -907,6 +907,12 @@ db_init()
config_get SQL_DB_FILE global db_file "/tmp/obuspa/usp.db"
config_get role_file global role_file ""
if [ -f "${SQL_DB_FILE}" ]; then
if [ "${reason}" != "update" ]; then
return 0;
fi
fi
if [ -f "${SQL_DB_FILE}.old" ] && [ ! -f "${SQL_DB_FILE}" ]; then
log "Copying old db, since new db not present ..."
mv ${SQL_DB_FILE}.old ${SQL_DB_FILE}