mirror of https://github.com/Aidaho12/haproxy-wi
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
311 B
12 lines
311 B
7 years ago
|
#!/usr/bin/env python3
|
||
|
import os, sys
|
||
|
|
||
|
from http.server import HTTPServer, CGIHTTPRequestHandler
|
||
|
|
||
|
sys.stderr = open('/opt/haproxy/log/haproxy-monitor.log', 'w')
|
||
|
webdir = "/opt/haproxy"
|
||
|
os.chdir(webdir)
|
||
|
server_address = ("", 8000)
|
||
|
httpd = HTTPServer(server_address, CGIHTTPRequestHandler)
|
||
|
httpd.serve_forever()
|