expand GNUNET_OS_ProjectData API to also enable de-duplcation of logic for --help
[oweals/gnunet.git] / src / util / util.conf
index 7a4d3c704dbd9dcfb8ba71a4a06018574ef349e1..6b9c52d004d88351e4a5b921f469edec9e84a8ef 100644 (file)
@@ -8,7 +8,7 @@
 # We usually want $HOME for $GNUNET_HOME, but we allow testcases to
 # easily override this by setting $GNUNET_TEST_HOME.
 #
-GNUNET_HOME = ${GNUNET_TEST_HOME:-$HOME}
+GNUNET_HOME = ${GNUNET_TEST_HOME:-${HOME:-${USERPROFILE}}}
 
 # see XDG Base Directory Specification at
 # http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
@@ -18,16 +18,27 @@ GNUNET_HOME = ${GNUNET_TEST_HOME:-$HOME}
 GNUNET_DATA_HOME = ${XDG_DATA_HOME:-$GNUNET_HOME/.local/share}/gnunet/
 
 # Configuration files
-GNUNET_CONFIG_HOME = ${XDG_CONFIG_HOME:-GNUNET_HOME/.config/}gnunet/
+GNUNET_CONFIG_HOME = ${XDG_CONFIG_HOME:-$GNUNET_HOME/.config}/gnunet/
 
 # Cached data, no big deal if lost
-GNUNET_CACHE_HOME = ${XDG_CACHE_HOME:-$GNUNET_HOME/.cache/}gnunet/
+GNUNET_CACHE_HOME = ${XDG_CACHE_HOME:-$GNUNET_HOME/.cache}/gnunet/
 
 # Runtime data (i.e UNIX domain sockets, locks, always lost on system boot)
-GNUNET_RUNTIME_DIR = ${XDG_RUNTIME_DIR:-${TMPDIR:-${TMP:-/tmp}}}gnunet/
+# This is the variable for system-wide services; use GNUNET_USER_RUNTIME_DIR
+# for per-user services (where USER_SERVICE=YES is set)
+# Note that the 'gnunet'/system user must have $TMPDIR/$TMP set to
+# exactly the same values as 'normal' users, otherwise this will fail.
+# If $TMPDIR or $TMP are set to different directories for different
+# users, this option should be changed to point to the same directory
+# for all users (i.e. by simply using "/tmp/gnunet-system-runtime/").
+GNUNET_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/gnunet-system-runtime/
+
+# Runtime data for per-user services
+GNUNET_USER_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/gnunet-${USERHOME:-${USER:-user}}-runtime/
+
 
 # Legacy option...
-GNUNET_TEST_HOME = ~/.gnunet/
+GNUNET_TEST_HOME = ~/.gnunet/
 # GNUNET_TEST_HOME = /var/lib/gnunet/
 
 # DEFAULTCONFIG = /etc/gnunet.conf
@@ -43,3 +54,8 @@ PRIVATE_KEY = $GNUNET_DATA_HOME/private_key.ecc
 [TESTING]
 SPEEDUP_INTERVAL = 0 ms
 SPEEDUP_DELTA = 0 ms
+# This following option is applicable to LINUX.  Enabling this option causes all
+# UNIX domain sockets to be opened as abstract sockets.  Note that the
+# filesystem level restrictions no longer apply for abstract sockets.  An
+# end-user should not modify this option.
+USE_ABSTRACT_SOCKETS = NO