diff --git a/setup.py b/setup.py index 9e2aea1..160ee85 100644 --- a/setup.py +++ b/setup.py @@ -16,11 +16,12 @@ for name in glob.glob('config/plugins.d/*.conf'): for name in glob.glob('wo/cli/templates/*.mustache'): templates.insert(1, name) -if not os.path.exists('/var/log/wo/'): - os.makedirs('/var/log/wo/') +if os.geteuid() == 0: + if not os.path.exists('/var/log/wo/'): + os.makedirs('/var/log/wo/') -if not os.path.exists('/var/lib/wo/tmp/'): - os.makedirs('/var/lib/wo/tmp/') + if not os.path.exists('/var/lib/wo/tmp/'): + os.makedirs('/var/lib/wo/tmp/') setup(name='wordops', version='3.9.9.2',