parent
e517332a65
commit
ae4501ae21
26 changed files with 1357 additions and 623 deletions
cmd/tstor
|
@ -81,17 +81,17 @@ func run(configPath string) error {
|
|||
log := rlog.Component("run")
|
||||
|
||||
// TODO make optional
|
||||
err = syscall.Setpriority(syscall.PRIO_PGRP, 0, 19)
|
||||
if err != nil {
|
||||
log.Error(ctx, "set priority failed", rlog.Error(err))
|
||||
}
|
||||
// err = syscall.Setpriority(syscall.PRIO_PGRP, 0, 19)
|
||||
// if err != nil {
|
||||
// log.Error(ctx, "set priority failed", rlog.Error(err))
|
||||
// }
|
||||
|
||||
if err := os.MkdirAll(conf.SourceDir, 0744); err != nil {
|
||||
return fmt.Errorf("error creating data folder: %w", err)
|
||||
}
|
||||
|
||||
sourceFs := osfs.New(conf.SourceDir, osfs.WithBoundOS())
|
||||
tsrv, err := torrent.NewService(sourceFs, conf.TorrentClient)
|
||||
tsrv, err := torrent.NewDaemon(sourceFs, conf.TorrentClient)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error creating service: %w", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue