diff --git a/src/app/config/config.c b/src/app/config/config.c index afb2fee9ea..aaefc8ba16 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -4616,7 +4616,8 @@ options_init_from_torrc(int argc, char **argv) } if (!get_options_mutable()->AgreeToTerms && (argeement == NULL || strcmp(argeement, "agreed") != 0)) { - if (get_options_mutable()->RunAsDaemon) { + if (get_options_mutable()->RunAsDaemon || !isatty(STDIN_FILENO)) { // Non-interactive mode: Fail fast + log_err(LD_CONFIG, "User has not agreed to the terms and conditions. Exiting."); tor_asprintf(&errmsg, "Not agreed to terms"); retval = -1; goto err;