diff --git a/nginx_proxy.py b/nginx_proxy.py index 63e2181..bb6bdab 100755 --- a/nginx_proxy.py +++ b/nginx_proxy.py @@ -112,7 +112,8 @@ def handle_event(event): print('HUPing nginx') os.kill(pid, signal.SIGHUP) -os.mkdir(target_path) +if not os.path.exists(target_path): + os.mkdirs(target_path) pid = get_pid()