summaryrefslogtreecommitdiff
path: root/src/nshd/hackers_git/hackers.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/nshd/hackers_git/hackers.go')
-rw-r--r--src/nshd/hackers_git/hackers.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/nshd/hackers_git/hackers.go b/src/nshd/hackers_git/hackers.go
index 88f27ed..9e3976b 100644
--- a/src/nshd/hackers_git/hackers.go
+++ b/src/nshd/hackers_git/hackers.go
@@ -22,7 +22,7 @@ type Config struct {
type Hackers struct {
util.NullBackend
- cfg Config
+ Cfg Config
lock sync.RWMutex
users map[int32]user
@@ -38,20 +38,17 @@ type Hackers struct {
var _ nslcd_systemd.Backend = &Hackers{}
var _ nslcd_proto.Backend = &Hackers{}
-func NewHackers(config Config) *Hackers {
- o := Hackers{
- cfg: config,
- }
+func (o *Hackers) Init() error {
err := o.Reload()
if err != nil {
logger.Err("Could not initialize hackers.git: %v", err)
- return nil
+ return err
}
go func() {
defer lsb.Recover()
o.worker()
}()
- return &o
+ return nil
}
func (o *Hackers) Close() {