From 6668c2e14ba7faf2f42d23240d7c75e643c7f706 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 4 Apr 2024 11:42:19 +0800 Subject: [PATCH] update --- plugins/op_waf/index.py | 6 ++++++ plugins/op_waf/info.json | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/op_waf/index.py b/plugins/op_waf/index.py index 88e7d4b8a..949c28e78 100755 --- a/plugins/op_waf/index.py +++ b/plugins/op_waf/index.py @@ -579,6 +579,12 @@ def reload(): mw.opWeb('start') return 'ok' +def reload_hook(): + s = status() + if s == 'start': + return reload() + return 'ok' + def getJsonPath(name): path = getServerDir() + "/waf/" + name + ".json" diff --git a/plugins/op_waf/info.json b/plugins/op_waf/info.json index e8c0e9feb..53b850973 100755 --- a/plugins/op_waf/info.json +++ b/plugins/op_waf/info.json @@ -5,9 +5,9 @@ "site_cb": { "title":"网站统计", "name":"op_waf", - "add":{"func":"reload"}, - "update":{"func":"reload"}, - "delete":{"func":"reload"} + "add":{"func":"reload_hook"}, + "update":{"func":"reload_hook"}, + "delete":{"func":"reload_hook"} } } ],