mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
change ssl port type in DB and fix apply
This commit is contained in:
@@ -60,10 +60,6 @@ func main() {
|
|||||||
params.Port = "8090"
|
params.Port = "8090"
|
||||||
}
|
}
|
||||||
|
|
||||||
if params.SslPort == "" {
|
|
||||||
params.SslPort = "8091"
|
|
||||||
}
|
|
||||||
|
|
||||||
settings.Path = params.Path
|
settings.Path = params.Path
|
||||||
settings.HttpAuth = params.HttpAuth
|
settings.HttpAuth = params.HttpAuth
|
||||||
log.Init(params.LogPath, params.WebLogPath)
|
log.Init(params.LogPath, params.WebLogPath)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"server/log"
|
"server/log"
|
||||||
"server/settings"
|
"server/settings"
|
||||||
@@ -17,8 +18,9 @@ func Start(port, sslport, sslCert, sslKey string, sslEnabled, roSets, searchWA b
|
|||||||
// set settings ssl enabled
|
// set settings ssl enabled
|
||||||
settings.Ssl = sslEnabled
|
settings.Ssl = sslEnabled
|
||||||
if sslport == "" {
|
if sslport == "" {
|
||||||
if settings.BTsets.SslPort != "" {
|
userSSlPort := strconv.Itoa(settings.BTsets.SslPort)
|
||||||
sslport = settings.BTsets.SslPort
|
if userSSlPort != "0" {
|
||||||
|
sslport = userSSlPort
|
||||||
} else {
|
} else {
|
||||||
sslport = "8091"
|
sslport = "8091"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ type BTSets struct {
|
|||||||
PeersListenPort int
|
PeersListenPort int
|
||||||
|
|
||||||
// HTTPS
|
// HTTPS
|
||||||
SslPort string
|
SslPort int
|
||||||
SslCert string
|
SslCert string
|
||||||
SslKey string
|
SslKey string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ func Start() {
|
|||||||
dlna.Start()
|
dlna.Start()
|
||||||
}
|
}
|
||||||
|
|
||||||
log.TLogln(settings.BTsets)
|
|
||||||
//check if https enabled
|
//check if https enabled
|
||||||
if settings.Ssl {
|
if settings.Ssl {
|
||||||
//if no cert and key files set in db/settings, generate new self-signed cert and key files
|
//if no cert and key files set in db/settings, generate new self-signed cert and key files
|
||||||
@@ -92,7 +91,7 @@ func Start() {
|
|||||||
settings.SetBTSets(settings.BTsets)
|
settings.SetBTSets(settings.BTsets)
|
||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
log.TLogln("Starting https server at port", settings.SslPort)
|
log.TLogln("Start https server at port", settings.SslPort)
|
||||||
waitChan <- route.RunTLS(":"+settings.SslPort, settings.BTsets.SslCert, settings.BTsets.SslKey)
|
waitChan <- route.RunTLS(":"+settings.SslPort, settings.BTsets.SslCert, settings.BTsets.SslKey)
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user