mirror of
https://github.com/owncast/owncast.git
synced 2025-11-01 19:32:20 +08:00
Do not copy data dir on build. Create data dir if needed on launch
This commit is contained in:
6
main.go
6
main.go
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@ -56,6 +57,11 @@ func main() {
|
||||
}
|
||||
log.Infoln(config.GetReleaseString())
|
||||
|
||||
// Create the data directory if needed
|
||||
if !utils.DoesFileExists("data") {
|
||||
os.Mkdir("./data", 0700)
|
||||
}
|
||||
|
||||
// Allows a user to restore a specific database backup
|
||||
if *restoreDatabaseFile != "" {
|
||||
databaseFile := config.DatabaseFilePath
|
||||
|
||||
Reference in New Issue
Block a user