From d691f3a319c0abd82e2818430638335c7607032b Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 8 Oct 2019 17:39:00 +0200 Subject: [PATCH] Fix setup.py --- setup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 8d009d8..ce63717 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.3',