Skip to content

Commit

Permalink
Execute restart script when exit call back
Browse files Browse the repository at this point in the history
  • Loading branch information
isanwenyu committed Jul 5, 2023
1 parent cd3774e commit 560e3f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion channel/wechat/wechat_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ def exitCallback(self, userName = None):
send_markdown_msg(f'[{userName}] LOG OUT!')
#退出后重新拉起登录
if conf().get("logout_restart") == True:
self.startup()
#使用脚本先关闭再启动
os.system('./scripts/shutdown.sh')
os.system('./scripts/start.sh')
except Exception as e:
logger.debug("[WX]exitCallback {} error: {}".format(userName, e))

Expand Down

0 comments on commit 560e3f5

Please sign in to comment.