mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Print githash and build time at startup
This commit is contained in:
@@ -5,6 +5,15 @@ import (
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime/debug"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/99designs/gqlgen/handler"
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/go-chi/chi/middleware"
|
||||
@@ -16,16 +25,11 @@ import (
|
||||
"github.com/stashapp/stash/pkg/manager/paths"
|
||||
"github.com/stashapp/stash/pkg/models"
|
||||
"github.com/stashapp/stash/pkg/utils"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime/debug"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var buildstamp string = ""
|
||||
var githash string = ""
|
||||
|
||||
var uiBox *packr.Box
|
||||
|
||||
//var legacyUiBox *packr.Box
|
||||
@@ -154,6 +158,7 @@ func Start() {
|
||||
}
|
||||
|
||||
go func() {
|
||||
printVersion()
|
||||
logger.Infof("stash is running on HTTPS at https://" + address + "/")
|
||||
logger.Fatal(httpsServer.ListenAndServeTLS("", ""))
|
||||
}()
|
||||
@@ -164,12 +169,17 @@ func Start() {
|
||||
}
|
||||
|
||||
go func() {
|
||||
printVersion()
|
||||
logger.Infof("stash is running on HTTP at http://" + address + "/")
|
||||
logger.Fatal(server.ListenAndServe())
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
func printVersion() {
|
||||
fmt.Printf("stash version: %s (%s)\n", githash, buildstamp)
|
||||
}
|
||||
|
||||
func makeTLSConfig() *tls.Config {
|
||||
cert, err := ioutil.ReadFile(paths.GetSSLCert())
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user