mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-27 20:45:56 +00:00
Turn chasquid-userdb into chasquid-util
This patch removes chasquid-userdb and adds a more generic and extensive chasquid-util, that supports various operations on user databases as well as aliases lookups. The code is not very pretty but for now I took a more practical approach, the tool is ancillary and can be tidied up later.
This commit is contained in:
@@ -69,11 +69,11 @@ type Recipient struct {
|
||||
Type RType
|
||||
}
|
||||
|
||||
type RType int
|
||||
type RType string
|
||||
|
||||
const (
|
||||
EMAIL RType = iota
|
||||
PIPE
|
||||
EMAIL RType = "(email)"
|
||||
PIPE RType = "(pipe)"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -62,11 +62,10 @@ func Load(path string) (*Config, error) {
|
||||
c.DataDir = "/var/lib/chasquid"
|
||||
}
|
||||
|
||||
logConfig(c)
|
||||
return c, nil
|
||||
}
|
||||
|
||||
func logConfig(c *Config) {
|
||||
func LogConfig(c *Config) {
|
||||
glog.Infof("Configuration:")
|
||||
glog.Infof(" Hostname: %q", c.Hostname)
|
||||
glog.Infof(" Max data size (MB): %d", c.MaxDataSizeMb)
|
||||
|
||||
Reference in New Issue
Block a user