pull/109/head
midoks 4 years ago
parent f43ae1a877
commit 698c684a8a
  1. 2
      class/core/system_api.py
  2. 7
      plugins/redis/index.py

@ -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)

@ -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)

Loading…
Cancel
Save