Skip to content

Commit

Permalink
更新内置AstralQsign的启动方式
Browse files Browse the repository at this point in the history
Co-Authored-By: 赵怡然 <[email protected]>
Co-Authored-By: 元理 <[email protected]>
  • Loading branch information
3 people committed Jun 10, 2024
1 parent 6f7f0d0 commit 9611319
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OlivOS/libBooter/libAstralQsignEXEModelAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def run(self):
tmp_env = dict(os.environ)
tmp_env['FORCE_TTY'] = ''
model_Proc = subprocess.Popen(
f".\\start.bat {self.server_data['port']}",
f".\\start.bat \"localhost\" \"{self.server_data['port']}\" \"{self.server_data['token']}\"",
cwd='.\\conf\\astral-qsign',
shell=True,
stdin=subprocess.PIPE,
Expand Down
4 changes: 3 additions & 1 deletion OlivOS/libBooter/libEXEModelAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ def setConfig(self):
# 为 false 时,将不会自动注册实例,在签名服务器重启或实例被销毁后需要重启 go-cqhttp 以获取实例
# 否则后续消息将不会正常签名。关闭此项后可以考虑开启签名服务器端 auto_register 避免需要重启
# 由于实现问题,当前建议关闭此项,推荐开启签名服务器的自动注册实例
auto-register: false
auto-register: {auto-register}
# 是否在 token 过期后立即自动刷新签名 token(在需要签名时才会检测到,主要防止 token 意外丢失)
# 独立于定时刷新
auto-refresh-token: false
Expand Down Expand Up @@ -970,6 +970,7 @@ def setConfig(self):
key: '-'
authorization: '-'
'''
self.config_file_format['auto-register'] = 'false'
if 'qsign-server' in self.bot_info_dict.extends \
and type(self.bot_info_dict.extends['qsign-server']) is list \
and len(self.bot_info_dict.extends['qsign-server']) > 0:
Expand All @@ -992,6 +993,7 @@ def setConfig(self):
key: '%s'
authorization: '-'
''' % (str(self.sub_target_proc['server']['port']), str(self.sub_target_proc['server']['token']))
self.config_file_format['auto-register'] = 'true'

self.config_file_str = self.config_file_str.format(**self.config_file_format)

Expand Down

0 comments on commit 9611319

Please sign in to comment.