From cf36a28de795dee5aa71a2e03bb85f7b4ca25a9f Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 25 Jun 2022 19:14:19 +0800 Subject: [PATCH] Update common.py --- class/core/common.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/class/core/common.py b/class/core/common.py index b91df42b8..4d6492a12 100755 --- a/class/core/common.py +++ b/class/core/common.py @@ -20,10 +20,9 @@ from flask import redirect def init(): - initDB() - initInitD() initUserInfo() + initInitD() def local(): @@ -57,7 +56,6 @@ def doContentReplace(src, dst): def initInitD(): - mw.setHostAddr(mw.getLocalIp()) # systemctl # 有问题 @@ -97,6 +95,9 @@ def initInitD(): mw.execShell('which chkconfig && chkconfig --add mw') mw.execShell('which update-rc.d && update-rc.d -f mw defaults') + # 获取系统IPV4 + mw.setHostAddr(mw.getLocalIp()) + def initUserInfo():