From 698c684a8a7cc98d65eae345c2b2e23ca0fec8c7 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 23 Nov 2021 03:29:25 +0800 Subject: [PATCH] fix --- class/core/system_api.py | 2 +- plugins/redis/index.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/class/core/system_api.py b/class/core/system_api.py index 1fa78dbfa..b080a8fba 100755 --- a/class/core/system_api.py +++ b/class/core/system_api.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) diff --git a/plugins/redis/index.py b/plugins/redis/index.py index 1d4fc2e60..5b77945ac 100755 --- a/plugins/redis/index.py +++ b/plugins/redis/index.py @@ -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)