mirror of
https://github.com/monero-project/monero.git
synced 2025-12-11 09:31:28 +09:00
Merge pull request #3259
6d900a40 removed systemd private tempdir (ston1th) 496055d1 monerod: do not log to tmpdir in daemon mode (ston1th)
This commit is contained in:
commit
b54587d7b3
@ -54,6 +54,10 @@ else()
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
add_definitions(-DDEBUG_TMPDIR_LOG=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
monero_private_headers(daemonizer
|
monero_private_headers(daemonizer
|
||||||
${daemonizer_private_headers})
|
${daemonizer_private_headers})
|
||||||
monero_add_library(daemonizer
|
monero_add_library(daemonizer
|
||||||
|
|||||||
@ -115,6 +115,7 @@ void fork(const std::string & pidfile)
|
|||||||
quit("Unable to open /dev/null");
|
quit("Unable to open /dev/null");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG_TMPDIR_LOG
|
||||||
// Send standard output to a log file.
|
// Send standard output to a log file.
|
||||||
const char *tmpdir = getenv("TMPDIR");
|
const char *tmpdir = getenv("TMPDIR");
|
||||||
if (!tmpdir)
|
if (!tmpdir)
|
||||||
@ -133,6 +134,7 @@ void fork(const std::string & pidfile)
|
|||||||
{
|
{
|
||||||
quit("Unable to dup output descriptor");
|
quit("Unable to dup output descriptor");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace posix
|
} // namespace posix
|
||||||
|
|||||||
@ -15,7 +15,6 @@ ExecStart=/usr/bin/monerod --config-file /etc/monerod.conf \
|
|||||||
--detach --pidfile /run/monero/monerod.pid
|
--detach --pidfile /run/monero/monerod.pid
|
||||||
|
|
||||||
Restart=always
|
Restart=always
|
||||||
PrivateTmp=true
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user