murphy/main.go

28 lines
521 B
Go
Raw Normal View History

2021-11-30 14:58:33 +01:00
package main
import (
"git.entr0py.de/garionion/murphy/scanner"
"git.entr0py.de/garionion/murphy/store"
"github.com/mehdioa/nlog"
2021-11-30 23:09:34 +01:00
"sync"
2021-12-01 01:10:46 +01:00
"time"
2021-11-30 14:58:33 +01:00
)
var log *nlog.Logger
const source = "/mnt/clarkson"
2021-12-01 01:10:46 +01:00
const gracePeriod = time.Hour * 24 * 30
2021-11-30 14:58:33 +01:00
func main() {
formatter := nlog.NewTextFormatter(true, true)
log = nlog.NewLogger(nlog.DebugLevel, formatter)
2021-12-01 01:10:46 +01:00
sourcePaths := []string{source}
s := store.NewStore(log, sourcePaths, gracePeriod)
2021-11-30 14:58:33 +01:00
2021-12-01 01:10:46 +01:00
scanner.InitScanner(s)
2021-11-30 23:09:34 +01:00
wg := new(sync.WaitGroup)
wg.Add(2)
wg.Wait()
2021-11-30 14:58:33 +01:00
}