working commit
This commit is contained in:
@@ -78,6 +78,10 @@ func (srv *Server) SetPort(port int64) {
|
||||
srv.conf.Service.Port = port
|
||||
}
|
||||
|
||||
func (srv *Server) SetAsDaemon(asDaemon bool) {
|
||||
srv.conf.AsDaemon = asDaemon
|
||||
}
|
||||
|
||||
func (srv *Server) Configure() error {
|
||||
var err error
|
||||
srv.logg.Infof("Configuration server")
|
||||
@@ -94,11 +98,6 @@ func (srv *Server) Configure() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = srv.conf.ReadOptions()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -159,7 +158,7 @@ func (srv *Server) Build() error {
|
||||
|
||||
// Creating datadir
|
||||
datadir := srv.conf.Datadir
|
||||
if !auxtool.DirExists(datadir) {
|
||||
if !auxtool.DirExists(datadir) { // TODO: check access to dir
|
||||
srv.logg.Infof("Creating data directory %s ", datadir)
|
||||
err = os.MkdirAll(datadir, 0750)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user