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:
Riccardo Spagni 2018-03-05 19:10:51 +02:00
commit b54587d7b3
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
3 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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