mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 07:33:21 +00:00

The --log option accepts "-" as filename. This prevents rest-server from opening the log file, it simply writes to the STDOUT stream provided by the caller. **BREAKING** in case use really used "-" to specify a file named "-" you'll need to update your rest-server invocation to use "./-".
13 lines
527 B
Text
13 lines
527 B
Text
Feature: Allows "-" as filename for the `--log` option.
|
|
|
|
When (e.g. for debugging purpose) the rest server is invoked like
|
|
|
|
sudo -u restic rest-server … --log /dev/stdout
|
|
|
|
it tries to open `/dev/stdout` (O_CREATE, O_WRITE, O_APPEND). This
|
|
operation fails, as in the above invocation, `/dev/stdout` is owned by
|
|
the caller (here: root) and only writable for the caller. Subprocesses
|
|
get just the filedescriptor. Using `/proc/self/fd/1` didn't work either,
|
|
for the same reasons.
|
|
|
|
https://github.com/restic/rest-server/pull/217
|