]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - run.py
Add dynamic setting of UI options in URL.
[irc/quakenet/qwebirc.git] / run.py
diff --git a/run.py b/run.py
index 4803cdc1e4a275173df6a0650e375468ebf7e497..2abefd69be4df540080a6bc8050a3514838d3c79 100755 (executable)
--- a/run.py
+++ b/run.py
@@ -37,7 +37,10 @@ parser.add_option("-l", "--logfile", help="Path to twisted log file.", dest="log
 parser.add_option("-c", "--clf", help="Path to web CLF (Combined Log Format) log file.", dest="clogfile")
 parser.add_option("-C", "--certificate", help="Path to SSL certificate.", dest="sslcertificate")
 parser.add_option("-k", "--key", help="Path to SSL key.", dest="sslkey")
+parser.add_option("-H", "--certificate-chain", help="Path to SSL certificate chain file.", dest="sslchain")
 parser.add_option("-P", "--pidfile", help="Path to store PID file", dest="pidfile")
+parser.add_option("-s", "--syslog", help="Log to syslog", action="store_true", dest="syslog", default=False)
+parser.add_option("--syslog-prefix", help="Syslog prefix", dest="syslog_prefix", default="qwebirc")
 
 sargs = sys.argv[1:]
 if "ARGS" in dir(config):
@@ -59,6 +62,11 @@ if options.logfile:
   args1+=["--logfile", options.logfile]
 if options.pidfile:
   args1+=["--pidfile", options.pidfile]
+if options.syslog:
+  args1+=["--syslog"]
+if options.syslog and options.syslog_prefix:
+  import syslog
+  syslog.openlog(options.syslog_prefix)
 
 if not options.tracebacks:
   args2.append("-n")
@@ -67,6 +75,8 @@ if options.clogfile:
 
 if options.sslcertificate and options.sslkey:
   args2+=["--certificate", options.sslcertificate, "--privkey", options.sslkey, "--https", options.port]
+  if options.sslchain:
+    args2+=["--certificate-chain", options.sslchain]
 else:
   args2+=["--port", options.port]