dnc: fix systemd service
Remove the needs of dnc user. We should not force admins to create
a new dedicated user.
Use a env variable to cache data and add fallbacks to avoid any crash
Change-Id: If8fa2ced856c36f2d63870f9b6a6fc7839d91040
diff --git a/tools/common.h b/tools/common.h
index d08512d..b1bde5c 100644
--- a/tools/common.h
+++ b/tools/common.h
@@ -25,7 +25,8 @@
using Buffer = std::shared_ptr<std::vector<uint8_t>>;
constexpr size_t BUFFER_SIZE = 64 * 1024;
-const std::filesystem::path PATH = std::filesystem::path(getenv("HOME")) / ".dhtnet";
+
+std::filesystem::path cachePath();
std::unique_ptr<ConnectionManager::Config> connectionManagerConfig(
dht::crypto::Identity identity,