This commit is contained in:
midoks 2023-09-07 13:36:54 +08:00
parent ee498b7094
commit cac45b3732
2 changed files with 10 additions and 0 deletions

View File

@ -105,6 +105,7 @@ docker run -itd --name mw-server --privileged=true -p 7200:7200 -p 80:80 -p 443:
* 给防盗链增加禁止空来源。
* OpenResty安装兼容。
* Debian10安装优化。
* 安装时默认监控开启。
### JSDelivr安装地址

View File

@ -145,10 +145,19 @@ def initInitTask():
api.createCertCron()
def initSystemControl():
import system_api
sapi = system_api.system_api()
sapi.setControl(1, 30)
def initUserInfo():
data = mw.M('users').where('id=?', (1,)).getField('password')
if data == '21232f297a57a5a743894a0e4a801fc3':
# 默认监控开启
initSystemControl()
pwd = mw.getRandomString(8).lower()
file_pw = mw.getRunDir() + '/data/default.pl'
mw.writeFile(file_pw, pwd)