mirror of
https://github.com/owncast/owncast.git
synced 2024-11-21 20:28:15 +03:00
When starting the server provide a default stream offline state
This commit is contained in:
parent
06ec265038
commit
5cecb50b2e
2 changed files with 7 additions and 1 deletions
2
main.go
2
main.go
|
@ -24,7 +24,6 @@ var usingExternalStorage = false
|
|||
func main() {
|
||||
log.StandardLogger().Printf("Owncast v%s/%s (%s)", BuildVersion, BuildType, GitCommit)
|
||||
|
||||
resetDirectories(configuration)
|
||||
checkConfig(configuration)
|
||||
stats = getSavedStats()
|
||||
stats.Setup()
|
||||
|
@ -43,6 +42,7 @@ func main() {
|
|||
go monitorVideoContent(configuration.PrivateHLSPath, configuration, storage)
|
||||
}
|
||||
|
||||
resetDirectories(configuration)
|
||||
go startRTMPService()
|
||||
|
||||
startChatServer()
|
||||
|
|
6
utils.go
6
utils.go
|
@ -71,6 +71,12 @@ func resetDirectories(configuration Config) {
|
|||
os.MkdirAll(path.Join(configuration.PrivateHLSPath, strconv.Itoa(0)), 0777)
|
||||
os.MkdirAll(path.Join(configuration.PublicHLSPath, strconv.Itoa(0)), 0777)
|
||||
}
|
||||
|
||||
// Provide default files
|
||||
showStreamOfflineState(configuration)
|
||||
if !fileExists("webroot/thumbnail.png") {
|
||||
copy("static/logo.png", "webroot/thumbnail.png")
|
||||
}
|
||||
}
|
||||
|
||||
func getClientIDFromRequest(req *http.Request) string {
|
||||
|
|
Loading…
Reference in a new issue