mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-27 15:42:07 +02:00
Fix #7: make each module optional
This commit is contained in:
@ -15,6 +15,7 @@ import (
|
||||
|
||||
// Options holds web package configuration
|
||||
type Options struct {
|
||||
Enabled bool
|
||||
Favicon string
|
||||
Hostname string
|
||||
ListenAddress string
|
||||
@ -82,6 +83,11 @@ func Serve(rSdpChan chan struct {
|
||||
localSdpChan = lSdpChan
|
||||
cfg = c
|
||||
|
||||
if !cfg.Enabled {
|
||||
// SRT is not enabled, ignore
|
||||
return
|
||||
}
|
||||
|
||||
// Load templates
|
||||
if err := loadTemplates(); err != nil {
|
||||
log.Fatalln("Failed to load templates:", err)
|
||||
|
Reference in New Issue
Block a user