2014-04-26 09:18:56 +00:00
|
|
|
package ConfigurationDB
|
|
|
|
|
2014-10-19 17:19:11 +00:00
|
|
|
import (
|
|
|
|
"github.com/SommerEngineering/Ocean/Configuration"
|
|
|
|
"github.com/SommerEngineering/Ocean/Log"
|
|
|
|
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
|
|
|
)
|
2014-04-26 09:18:56 +00:00
|
|
|
|
2015-06-17 15:44:52 +00:00
|
|
|
// The init function for this package.
|
2014-04-26 09:18:56 +00:00
|
|
|
func init() {
|
|
|
|
config := Configuration.Read()
|
|
|
|
|
2015-06-21 18:20:27 +00:00
|
|
|
// Connect to the database:
|
|
|
|
connectDatabase(config)
|
2014-04-26 09:18:56 +00:00
|
|
|
|
2015-06-17 15:44:52 +00:00
|
|
|
// Check the system configuration:
|
2014-04-26 09:18:56 +00:00
|
|
|
checkConfiguration()
|
2015-06-17 15:44:52 +00:00
|
|
|
|
2014-04-26 09:18:56 +00:00
|
|
|
Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameDATABASE, `The configuration database is now ready.`)
|
|
|
|
}
|