mirror of
https://github.com/gravitl/netmaker.git
synced 2026-04-23 00:17:10 +08:00
adding yemplates
This commit is contained in:
+11
-2
@@ -79,6 +79,15 @@ func GetVersion() string {
|
||||
}
|
||||
return version
|
||||
}
|
||||
func GetDB() string {
|
||||
database := "rqlite"
|
||||
if os.Getenv("DATABASE") == "sqlite" {
|
||||
database = os.Getenv("DATABASE")
|
||||
} else if config.Config.Server.Database == "sqlite" {
|
||||
database = config.Config.Server.Database
|
||||
}
|
||||
return database
|
||||
}
|
||||
func GetAPIHost() string {
|
||||
serverhost := "127.0.0.1"
|
||||
remoteip, _ := GetPublicIP()
|
||||
@@ -332,8 +341,8 @@ func GetSQLConn() string {
|
||||
sqlconn := "http://"
|
||||
if os.Getenv("SQL_CONN") != "" {
|
||||
sqlconn = os.Getenv("SQL_CONN")
|
||||
} else if config.Config.Server.SQLConn != "" {
|
||||
} else if config.Config.Server.SQLConn != "" {
|
||||
sqlconn = config.Config.Server.SQLConn
|
||||
}
|
||||
return sqlconn
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user