Skip to content

Commit

Permalink
add --custom-root-private
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Jul 3, 2020
1 parent cd089d3 commit 4b8c73b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Use these to configure your Andesite instance. All are optional. "Name" refers t
| `--disable-hash` | | `string[]` | none. | Any of `md5`, `sha1`, `sha256`, `sha512`, `sha3`, `blake2b`. |
| `--hash-concurrency` | | `int` | cpu count | Number of hashes to run concurrently. |
| `--custom-root-public` | | `string[]` | none | Similar to `"roots_public"`, passed in the form `name=path`. |
| `--custom-root-private` | | `string[]` | none | Similar to `"roots_private"`, passed in the form `name=path`. |

> Note: for `--enable-search` and `--disable-search`, sending values to these flags will trigger a background scan of the root directory you point it at (whether that be `public`, `files`, etc). As such, unless content is changed or updated, it is not necessary to pass these flags across multiple runs of the app.
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func main() {
vflag.StringArrayVar(&idata.Config.OffHashes, "disable-hash", []string{}, "")
vflag.IntVar(&idata.Config.HashPllel, "hash-concurrency", runtime.NumCPU(), "")
vflag.StringArrayVar(&idata.Config.CRootsPub, "custom-root-public", []string{}, "")
vflag.StringArrayVar(&idata.Config.CRootsPrv, "custom-root-private", []string{}, "")
etc.PreInit()

etc.Init(&idata.Config, "./files/", db.SaveOAuth2InfoCb)
Expand Down Expand Up @@ -87,6 +88,9 @@ func main() {
for _, item := range idata.Config.CRootsPub {
idata.Config.RootsPub = append(idata.Config.RootsPub, strings.SplitN(item, "=", 2))
}
for _, item := range idata.Config.CRootsPrv {
idata.Config.RootsPrv = append(idata.Config.RootsPrv, strings.SplitN(item, "=", 2))
}

//
// database initialization
Expand Down
1 change: 1 addition & 0 deletions pkg/itypes/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type Config struct {
OffHashes []string
HashPllel int
CRootsPub []string
CRootsPrv []string
}

func (c *Config) GetDiscordClient() *oauth2.AppConf {
Expand Down

0 comments on commit 4b8c73b

Please sign in to comment.