mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-26 15:05:50 +03:00
parent
9d030f38b7
commit
d2e5692694
1 changed files with 0 additions and 4 deletions
4
app.go
4
app.go
|
@ -187,22 +187,18 @@ func askUsernamePasswordIfPossible() error {
|
|||
trace("File %s exists, won't ask for password", configfile)
|
||||
return nil
|
||||
}
|
||||
|
||||
if !terminal.IsTerminal(int(os.Stdin.Fd())) {
|
||||
return nil // do nothing
|
||||
}
|
||||
trace("stdin is a terminal")
|
||||
if !terminal.IsTerminal(int(os.Stdout.Fd())) {
|
||||
return nil // do nothing
|
||||
}
|
||||
trace("stdout is a terminal")
|
||||
fmt.Printf("Would you like to set user/password for the web interface authentication (yes/no)?\n")
|
||||
yesno, err := promptAndGet("Please type 'yes' or 'no': ")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if yesno[0] != 'y' && yesno[0] != 'Y' {
|
||||
trace("User didn't want password, exiting")
|
||||
return nil
|
||||
}
|
||||
username, err := promptAndGet("Please enter the username: ")
|
||||
|
|
Loading…
Reference in a new issue