Skip to content

lightningd: disallow --daemon without --log-file. #4350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions doc/lightningd-config.5
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ as well\.


\fBdaemon\fR
Run in the background, suppress stdout and stderr\.
Run in the background, suppress stdout and stderr\. Note that you need
to specify \fBlog-file\fR for this case\.


\fBconf\fR=\fIPATH\fR
Expand Down Expand Up @@ -607,4 +608,4 @@ Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
Note: the modules in the ccan/ directory have their own licenses, but
the rest of the code is covered by the BSD-style MIT license\.

\" SHA256STAMP:e9f294f15d8873a2332b5748179be09c1496c9e81576dc0e4546c047474289fd
\" SHA256STAMP:8e18374d48aff1d2574667c603e36cdac81c35e09a49397dc6982f1688dd454a
3 changes: 2 additions & 1 deletion doc/lightningd-config.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ Set to 0660 to allow users with the same group to access the RPC
as well.

**daemon**
Run in the background, suppress stdout and stderr.
Run in the background, suppress stdout and stderr. Note that you need
to specify **log-file** for this case.

**conf**=*PATH*
Sets configuration file, and disable reading the normal general and network
Expand Down
3 changes: 3 additions & 0 deletions lightningd/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,9 @@ static void check_config(struct lightningd *ld)

if (ld->use_proxy_always && !ld->proxyaddr)
fatal("--always-use-proxy needs --proxy");

if (ld->daemon_parent_fd != -1 && !ld->logfile)
fatal("--daemon needs --log-file");
}

static char *test_subdaemons_and_exit(struct lightningd *ld)
Expand Down