more config stuff

This commit is contained in:
brent s
2020-05-14 21:21:11 -04:00
parent 315af935ac
commit efb53be81b
2 changed files with 73 additions and 60 deletions

View File

@@ -8,8 +8,10 @@ try:
except ImportError:
_has_journald = False
logfile = '/var/log/tunnelbroker_manager.log'
if os.geteuid() == 0:
logfile = '/var/log/tunnelbroker_manager.log'
else:
logfile = '~/.cache/tunnelbroker_manager.log'
# Prep the log file.
logfile = os.path.abspath(os.path.expanduser(logfile))
os.makedirs(os.path.dirname(logfile), exist_ok = True, mode = 0o0700)