more implementation of runtime unlock
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
13
main.go
13
main.go
@@ -49,14 +49,17 @@ func main() {
|
||||
log.SetOutput(logfileWriter)
|
||||
log.Printf("SMT starting execution. Built on %s from sha1 %s\n", buildTime, sha1ver)
|
||||
|
||||
// Set secrets key from .env file
|
||||
keyString = os.Getenv("SECRETS_KEY")
|
||||
|
||||
// Initiate connection to sqlite and make sure our schema is up to date
|
||||
models.ConnectDatabase()
|
||||
|
||||
// let the models package know our secrets key
|
||||
models.LoadSecretKey(keyString)
|
||||
// Set secrets key from .env file
|
||||
keyString = os.Getenv("SECRETS_KEY")
|
||||
|
||||
if keyString != "" {
|
||||
// Key was defined in environment variable, let the models package know our secrets key
|
||||
log.Println("Found secret key in environment variable")
|
||||
models.ReceiveKey(keyString)
|
||||
}
|
||||
|
||||
// Create context that listens for the interrupt signal from the OS.
|
||||
ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
|
||||
|
Reference in New Issue
Block a user