This commit is contained in:
midoks 2021-11-23 03:29:25 +08:00
parent f43ae1a877
commit 698c684a8a
2 changed files with 7 additions and 2 deletions

View File

@ -616,7 +616,7 @@ class system_api:
def getServerInfo(self):
import urllib.request
import ssl
upAddr = 'https://raw.githubusercontent.com/midoks/mdserver-web/master/version/info.json'
upAddr = 'https://cdn.jsdelivr.net/gh/midoks/mdserver-web@latest/version/info.json'
try:
context = ssl._create_unverified_context()
req = urllib.request.urlopen(upAddr, context=context, timeout=3)

View File

@ -32,6 +32,11 @@ def getInitDFile():
def getConf():
path = getServerDir() + "/redis.conf"
return path
def getConfTpl():
path = getPluginDir() + "/config/redis.conf"
return path
@ -84,7 +89,7 @@ def initDreplace():
mw.execShell('chmod +x ' + file_bin)
# config replace
conf_content = mw.readFile(getConf())
conf_content = mw.readFile(getConfTpl())
conf_content = conf_content.replace('{$SERVER_PATH}', service_path)
mw.writeFile(getServerDir() + '/redis.conf', conf_content)