У @command{nncp-rm} команды появилась @option{-all} опция, применяемая
ко всем нодам сразу.
+@item
+У @command{nncp-check} команды появилась @option{-cycle} опция, вводящая
+проверку в бесконечный цикл.
+
@item
@command{nncp-pkt} может парсить @file{.hdr} файлы.
@option{-all} option appeared in @command{nncp-rm} command, applying to
all the nodes at once.
+@item
+@option{-cycle} option appeared in @command{nncp-check} command, looping
+the check in infinite cycle.
+
@item
@command{nncp-pkt} can parse @file{.hdr} files.
"log"
"os"
"path/filepath"
+ "time"
"go.cypherpunks.ru/nncp/v7"
)
func main() {
var (
nock = flag.Bool("nock", false, "Process .nock files")
+ cycle = flag.Uint("cycle", 0, "Repeat check after N seconds in infinite loop")
cfgPath = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
nodeRaw = flag.String("node", "", "Process only that node")
spoolPath = flag.String("spool", "", "Override path to spool")
}
}
+Cycle:
isBad := false
for nodeId, node := range ctx.Neigh {
if nodeOnly != nil && nodeId != *nodeOnly.Id {
isBad = true
}
}
+ if *cycle > 0 {
+ time.Sleep(time.Duration(*cycle) * time.Second)
+ goto Cycle
+ }
if isBad {
os.Exit(1)
}