}
type NotifyJSON struct {
- File *FromToJSON `json:"file,omitempty"`
- Freq *FromToJSON `json:"freq,omitempty"`
+ File *FromToJSON `json:"file,omitempty"`
+ Freq *FromToJSON `json:"freq,omitempty"`
+ Exec map[string]*FromToJSON `json:"exec,omitempty"`
}
type CfgJSON struct {
Log string `json:"log"`
Umask string `json:"umask",omitempty`
+ OmitPrgrs bool `json:"noprogress",omitempty`
+
Notify *NotifyJSON `json:"notify,omitempty"`
Self *NodeOurJSON `json:"self"`
rInt := int(r)
umaskForce = &rInt
}
+ showPrgrs := true
+ if cfgJSON.OmitPrgrs {
+ showPrgrs = false
+ }
ctx := Ctx{
Spool: spoolPath,
LogPath: logPath,
UmaskForce: umaskForce,
+ ShowPrgrs: showPrgrs,
Self: self,
Neigh: make(map[NodeId]*Node, len(cfgJSON.Neigh)),
Alias: make(map[string]*NodeId),
if cfgJSON.Notify.Freq != nil {
ctx.NotifyFreq = cfgJSON.Notify.Freq
}
+ if cfgJSON.Notify.Exec != nil {
+ ctx.NotifyExec = cfgJSON.Notify.Exec
+ }
}
vias := make(map[NodeId][]string)
for name, neighJSON := range cfgJSON.Neigh {