1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-27 20:45:56 +00:00

config: Add a "data_dir" option

This patch adds a "data_dir" option, that chasquid will use to store
persistent data. It defaults to "/var/lib/chasquid" (for now, at least).

Users will come in subsequent patches.
This commit is contained in:
Alberto Bertogli
2016-09-18 06:10:43 +01:00
parent e9d62e0467
commit 9ed30a747b
5 changed files with 32 additions and 15 deletions

View File

@@ -58,6 +58,10 @@ func Load(path string) (*Config, error) {
"-d", "%user%")
}
if c.DataDir == "" {
c.DataDir = "/var/lib/chasquid"
}
logConfig(c)
return c, nil
}
@@ -70,4 +74,5 @@ func logConfig(c *Config) {
glog.Infof(" Submission Addresses: %v", c.SubmissionAddress)
glog.Infof(" Monitoring address: %s", c.MonitoringAddress)
glog.Infof(" MDA: %s %v", c.MailDeliveryAgentBin, c.MailDeliveryAgentArgs)
glog.Infof(" Data directory: %s", c.DataDir)
}