From 9789ab6e373c2ac793c1702e5b81410ae5ee8912 Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 11 Apr 2026 15:04:56 +0800 Subject: [PATCH] Update index.py --- plugins/caddy/index.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/caddy/index.py b/plugins/caddy/index.py index fdd445a91..3afeb540e 100755 --- a/plugins/caddy/index.py +++ b/plugins/caddy/index.py @@ -69,6 +69,12 @@ def checkArgs(data, ck=[]): return (True, mw.returnJson(True, 'ok')) +def getOs(): + data = {} + data['os'] = mw.getOs() + data['auth'] = True + return mw.getJson(data) + def getConf(): path = getServerDir() + "/Caddyfile" return path @@ -156,9 +162,6 @@ def start(): def stop(): r = caddyOp('stop') - pid_file = getPidFile() - if os.path.exists(pid_file): - os.remove(pid_file) return r