oonib: oonib.conf should handle relative paths
Reported by KheOps on IRC:
16:06 KheOps ) Quick question: it doesn't seem enough to specifiy a tor_datadir that is empty for the first start of oonib, so that it puts its config there and reuses it on subsequent launches 16:07 KheOps ) Well the question is, is it supposed to be enough (in which case I may have missed somethng), or has it been thought another way? (like, having an already filled-up tor datadir from a previous tor run) 16:08 KheOps ) at the moment, oonib basiclly not creates a hidden service 16:08 KheOps ) ("httpo://None") 16:08 KheOps ) The tor_datadir speicifed is existant, accessible for writing, but empty at start 16:10 KheOps ) O_o it seems to be working when specified in an absolute way 16:12 KheOps ) I was intending to have it specified relatively to oonib's run_dir 16:13 KheOps ) rundir, sorry 16:17 [ (isis) ) KheOps: hmm, that is odd. i just set up a couple oonibs on new boxes, and did not experience this, though i did have the problem that if the directory didn't exist, it wasn't created but instead Tor would get to 100% and then stop because the dir was missing. 16:17 [ (isis) ) KheOps: let me log into one of those boxes and check whether i specified an absolute or relative path 16:22 KheOps ) Thank you :) 16:26 [ (isis) ) KheOps: yep, it seems to be that absolute paths do the trick, my config looks like this: 16:26 Irssi: Pasting 6 lines to #ooni. Press Ctrl-K if you wish to do this or Ctrl-C to cancel. 16:26 [ (isis) ) main: report_dir: '/home/isis/ooni-collector/reports' logfile: '/home/isis/ooni-collector/oonib-collector.log' tor_datadir: '/home/isis/ooni-collector/tordata' database_uri: 'sqlite://oonib_test_db.db' 16:26 KheOps ) Yes, same here, works with absolute path 16:27 [ (isis) ) whoops, except, obviously spaced according to YAML 16:27 KheOps ) It would be cool if it was possible to have it working relatively to rundir, though 16:30 [ (isis) ) that can be sometimes a bit of a pain to do, because when python apps are installed they go into either '/usr/share/python2.7/dist-packages' or '$HOME/.virtualenv' or '/usr/share/python2.7/site-packages' and you can't quite be sure how someone is going to install it or where it'll end up 16:31 [ (isis) ) we should probably just pick a canonical directory and just go with it, like /var/oonib or something 16:32 [ (isis) ) but you're right, as soon as someone specifies something else in the config, everything's going to get jumbled or broken again
KheOps also noted that there is a rundir setting in the config, and that it should be pretty easy to have the other paths respect the rundir config option if it is set.