This commit is contained in:
Mr Chen
2019-01-02 13:58:53 +08:00
parent e4179b4ae5
commit 7a8ab1acf1
3 changed files with 24 additions and 9 deletions
+13
View File
@@ -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 ----- ###
+4
View File
@@ -62,6 +62,10 @@ def getLogsDir():
return getRootDir() + '/wwwlogs'
def getBackupDir():
return getRootDir() + '/backup'
def getOs():
return sys.platform