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.
haproxy-wi/server.py

12 lines
311 B

#!/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()