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()