From 29b760ecb3ad990b43d850ee71011fff4fe7cc74 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 24 Jul 2022 01:45:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E8=A3=85=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/webstats/index.py | 4 ++++ plugins/webstats/install.sh | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/webstats/index.py b/plugins/webstats/index.py index ac6761d41..62a06c606 100755 --- a/plugins/webstats/index.py +++ b/plugins/webstats/index.py @@ -213,6 +213,10 @@ def initDreplace(): def start(): initDreplace() + + if not mw.isAppleSystem(): + mw.execShell("chown -R www:www " + getServerDir()) + mw.restartWeb() return 'ok' diff --git a/plugins/webstats/install.sh b/plugins/webstats/install.sh index d74e9bed8..777a579df 100755 --- a/plugins/webstats/install.sh +++ b/plugins/webstats/install.sh @@ -82,7 +82,10 @@ Install_App() echo "${VERSION}" > $serverPath/webstats/version.pl echo '安装完成' > $install_tmp - # cd $rootPath && python3 ${rootPath}/plugins/webstats/index.py start + + if [ "$sys_os" != "Darwin" ];then + cd $rootPath && python3 ${rootPath}/plugins/webstats/index.py start + fi } Uninstall_App()