Skip to content

Commit

Permalink
Merge pull request #634 from midoks/dev
Browse files Browse the repository at this point in the history
gorse安装检测
  • Loading branch information
midoks authored Dec 12, 2024
2 parents a77e37a + 307135d commit 6caedb5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion plugins/gorse/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def initRedisConf():
requirepass = ""
conf = mw.getServerDir() + '/redis/redis.conf'
content = mw.readFile(conf)
rep = r"^(requirepass" + r"\)\s*([.0-9A-Za-z_& ~]+)"
rep = r"^(requirepass)\s*([.0-9A-Za-z_& ~]+)"
tmp = re.search(rep, content, re.M)
if tmp:
requirepass = tmp.groups()[1]
Expand Down Expand Up @@ -312,6 +312,11 @@ def installPreInspection():
mongodb_path = mw.getServerDir() + "/mongodb"
if not os.path.exists(mongodb_path):
return "默认需要安装MongoDB"

if not mw.isAppleSystem():
glibc_ver = mw.getGlibcVersion()
if float(glibc_ver) < 2.32:
return '当前libc{}过低,需要大于2.31'.format(glibc_ver)
return 'ok'

if __name__ == "__main__":
Expand Down
6 changes: 5 additions & 1 deletion plugins/xui/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Install_app()

bash ${curPath}/install_xui.sh


# start xray
cd /usr/local/x-ui && bin/xray-linux-amd64 -c bin/config.json

cd ${rootPath} && python3 plugins/xui/index.py start
echo '安装完成'
}
Expand All @@ -35,7 +39,7 @@ Uninstall_app()

rm -rf $serverPath/xui
echo 'y' | x-ui uninstall
rm /usr/bin/x-ui -f
rm -rf /usr/bin/x-ui
echo '卸载完成'
}

Expand Down

0 comments on commit 6caedb5

Please sign in to comment.