mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-21 20:45:33 +03:00
next: add flag
This commit is contained in:
parent
c16b90918f
commit
aa7119648b
1 changed files with 19 additions and 3 deletions
|
@ -89,6 +89,12 @@ type options struct {
|
||||||
// TODO(a.garipov): Use.
|
// TODO(a.garipov): Use.
|
||||||
performUpdate bool
|
performUpdate bool
|
||||||
|
|
||||||
|
// noPermCheck, if true, instructs AdGuard Home to skip checking and
|
||||||
|
// migrating the permissions of its security-sensitive files.
|
||||||
|
//
|
||||||
|
// TODO(e.burkov): Use.
|
||||||
|
noPermCheck bool
|
||||||
|
|
||||||
// verbose, if true, instructs AdGuard Home to enable verbose logging.
|
// verbose, if true, instructs AdGuard Home to enable verbose logging.
|
||||||
verbose bool
|
verbose bool
|
||||||
|
|
||||||
|
@ -110,7 +116,8 @@ const (
|
||||||
disableUpdateIdx
|
disableUpdateIdx
|
||||||
glinetModeIdx
|
glinetModeIdx
|
||||||
helpIdx
|
helpIdx
|
||||||
localFrontend
|
localFrontendIdx
|
||||||
|
noPermCheckIdx
|
||||||
performUpdateIdx
|
performUpdateIdx
|
||||||
verboseIdx
|
verboseIdx
|
||||||
versionIdx
|
versionIdx
|
||||||
|
@ -214,7 +221,7 @@ var commandLineOptions = []*commandLineOption{
|
||||||
valueType: "",
|
valueType: "",
|
||||||
},
|
},
|
||||||
|
|
||||||
localFrontend: {
|
localFrontendIdx: {
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
description: "Use local frontend directories.",
|
description: "Use local frontend directories.",
|
||||||
long: "local-frontend",
|
long: "local-frontend",
|
||||||
|
@ -222,6 +229,14 @@ var commandLineOptions = []*commandLineOption{
|
||||||
valueType: "",
|
valueType: "",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
noPermCheckIdx: {
|
||||||
|
defaultValue: false,
|
||||||
|
description: "Skip checking the permissions of security-sensitive files.",
|
||||||
|
long: "no-permcheck",
|
||||||
|
short: "",
|
||||||
|
valueType: "",
|
||||||
|
},
|
||||||
|
|
||||||
performUpdateIdx: {
|
performUpdateIdx: {
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
description: "Update the current binary and restart the service in case it's installed.",
|
description: "Update the current binary and restart the service in case it's installed.",
|
||||||
|
@ -264,7 +279,8 @@ func parseOptions(cmdName string, args []string) (opts *options, err error) {
|
||||||
disableUpdateIdx: &opts.disableUpdate,
|
disableUpdateIdx: &opts.disableUpdate,
|
||||||
glinetModeIdx: &opts.glinetMode,
|
glinetModeIdx: &opts.glinetMode,
|
||||||
helpIdx: &opts.help,
|
helpIdx: &opts.help,
|
||||||
localFrontend: &opts.localFrontend,
|
localFrontendIdx: &opts.localFrontend,
|
||||||
|
noPermCheckIdx: &opts.noPermCheck,
|
||||||
performUpdateIdx: &opts.performUpdate,
|
performUpdateIdx: &opts.performUpdate,
|
||||||
verboseIdx: &opts.verbose,
|
verboseIdx: &opts.verbose,
|
||||||
versionIdx: &opts.version,
|
versionIdx: &opts.version,
|
||||||
|
|
Loading…
Reference in a new issue