• R/O
  • HTTP
  • SSH
  • HTTPS

karesansui: Commit

Git repository of Karesansui.


Commit MetaInfo

Revision6cb6b041bc084c7a4ed85683b08409e3fcbdcdc4 (tree)
Time2011-01-05 11:33:57
Authorkeisuke fukawa <keisuke@kare...>
Commiterkeisuke fukawa

Log Message

Add get data for ssl port number in lighttpd setting

Change Summary

Incremental Difference

--- a/karesansui/gadget/hostby1settingby1general.py
+++ b/karesansui/gadget/hostby1settingby1general.py
@@ -147,7 +147,7 @@ def get_view_server_conf(config):
147147 'uniqkey' : uniqkey,
148148 'port' : port_number,
149149 'access' : access_list,
150- 'ssl_status' : ssl_status,
150+ 'ssl_status' : ssl_status["status"],
151151 }
152152
153153 return server_config
--- a/karesansui/lib/file/configfile.py
+++ b/karesansui/lib/file/configfile.py
@@ -82,10 +82,12 @@ class LighttpdSslConf(LighttpdConfig):
8282
8383 def do_read(self, f):
8484 status = LIGHTTPD_DEFAULT_SSL
85+ port_number = None
8586 lines = f.readlines()
8687 if lines:
8788 status = lines[1].split('"')[1]
88- return status
89+ port_number = lines[0].split('==')[1].split('"')[1].split(':')[1]
90+ return {"status" : status, "port" : port_number}
8991
9092 def do_write(self, f, data):
9193 conf = env.get('KARESANSUI_CONF')
--- a/karesansui/lib/file/utiles.py
+++ b/karesansui/lib/file/utiles.py
@@ -39,6 +39,6 @@ def is_ssl():
3939 ssl_config_file = LighttpdSslConf(file_path)
4040 ssl_config = ssl_config_file.read()
4141
42- return ssl_config == LIGHTTPD_SSL_ON
42+ return ssl_config["status"] == LIGHTTPD_SSL_ON
4343 except Exception:
4444 raise KaresansuiException(_('Failed to read configuration file -%s') % file_path)
Show on old repository browser