mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
@@ -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 ----- ###
|
||||
|
||||
@@ -62,6 +62,10 @@ def getLogsDir():
|
||||
return getRootDir() + '/wwwlogs'
|
||||
|
||||
|
||||
def getBackupDir():
|
||||
return getRootDir() + '/backup'
|
||||
|
||||
|
||||
def getOs():
|
||||
return sys.platform
|
||||
|
||||
|
||||
Reference in New Issue
Block a user