* Added StatusReporter class to make HTTP requests back to Airtime * Handle even more errors now * Added proper logging and log rotation * Added --debug flag for increased logging.
22 lines
577 B
Python
Executable file
22 lines
577 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
import daemon
|
|
import argparse
|
|
import airtime_analyzer as aa
|
|
|
|
VERSION = "1.0"
|
|
|
|
print "Airtime Analyzer " + VERSION
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("-d", "--daemon", help="run as a daemon", action="store_true")
|
|
parser.add_argument("--debug", help="log full debugging output", action="store_true")
|
|
args = parser.parse_args()
|
|
|
|
if args.daemon:
|
|
with daemon.DaemonContext():
|
|
analyzer = aa.AirtimeAnalyzerServer(debug=args.debug)
|
|
else:
|
|
# Run without daemonizing
|
|
analyzer = aa.AirtimeAnalyzerServer(debug=args.debug)
|
|
|