backups: add -restore cli argument

This commit is contained in:
Harvey Tindall
2023-12-21 17:27:28 +00:00
parent 1bb83c88d9
commit ff73c72b0e
3 changed files with 35 additions and 0 deletions
+4
View File
@@ -56,6 +56,8 @@ var (
commit string
buildTimeUnix string
builtBy string
_LOADBAK *string
LOADBAK = ""
)
var temp = func() string {
@@ -355,8 +357,10 @@ func start(asDaemon, firstCall bool) {
}
app.storage.db_path = filepath.Join(app.dataPath, "db")
app.loadPendingBackup()
app.ConnectDB()
defer app.storage.db.Close()
// Read config-base for settings on web.
app.configBasePath = "config-base.json"
configBase, _ := fs.ReadFile(localFS, app.configBasePath)