From cf28d4b292f4543a10473bb05e202060d9c6434d Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Sat, 5 Oct 2019 00:46:23 +0200 Subject: [PATCH] update setup.py --- setup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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',