diff --git a/class/core/config_api.py b/class/core/config_api.py index 38846ed9d..7223beb3e 100755 --- a/class/core/config_api.py +++ b/class/core/config_api.py @@ -21,6 +21,19 @@ class config_api: data = {} data['site_path'] = public.getWwwDir() + data['backup_path'] = public.getBackupDir() + data['systemdate'] = public.execShell( + 'date +"%Y-%m-%d %H:%M:%S %Z %z"')[0].strip() + + if os.path.exists('data/port.pl'): + data['port'] = public.readFile('data/port.pl').strip() + else: + data['port'] = '7200' + + if os.path.exists('data/iplist.txt'): + data['ip'] = public.readFile('data/iplist.txt').strip() + else: + data['ip'] = '127.0.0.1' return data ##### ----- end ----- ### diff --git a/class/core/public.py b/class/core/public.py index bc556a900..08744bb65 100755 --- a/class/core/public.py +++ b/class/core/public.py @@ -62,6 +62,10 @@ def getLogsDir(): return getRootDir() + '/wwwlogs' +def getBackupDir(): + return getRootDir() + '/backup' + + def getOs(): return sys.platform diff --git a/route/templates/default/config.html b/route/templates/default/config.html index 16dd6b482..c43d4120c 100755 --- a/route/templates/default/config.html +++ b/route/templates/default/config.html @@ -22,7 +22,7 @@

设置

- +

为了提高安全,请修改别名、默认端口、面板用户和密码!

@@ -35,7 +35,7 @@

面板端口 - 建议端口范围8888 - 65535 + 建议端口范围8888 - 65535

域名 @@ -46,27 +46,25 @@

默认建站目录 - + 新创建的站点,默认将保存到该目录的下级目录!

默认备份目录 - + 网站和数据库的备份目录!

服务器IP - - - 默认为外网IP,若您在本地虚拟机测试,请填写虚拟机内网IP! - + + 默认为外网IP,若您在本地虚拟机测试,请填写虚拟机内网IP!

服务器时间 - 同步 + 同步

面板用户