From 0a089fcedf8a0c9467b94acb7c995e7186a6bbd6 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 24 Aug 2023 14:41:58 +0800 Subject: [PATCH] Update index.py --- plugins/openresty/index.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index da32377ee..75d0c16af 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -308,10 +308,15 @@ def reload(): def initdStatus(): - - if mw.isAppleSystem(): + current_os = mw.getOs() + if getOs() == 'darwin': return "Apple Computer does not support" + if current_os.startswith('freebsd'): + initd_bin = getInitDFile() + if os.path.exists(initd_bin): + return 'ok' + shell_cmd = 'systemctl status openresty | grep loaded | grep "enabled;"' data = mw.execShell(shell_cmd) if data[0] == '':