Update install.sh

pull/139/head
midoks 3 years ago
parent 070f3924d0
commit c37845ea2f
  1. 10
      plugins/webstats/install.sh

@ -20,6 +20,10 @@ else
BAK=''
fi
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
fi
Install_App()
{
echo '正在安装脚本文件...' > $install_tmp
@ -60,6 +64,7 @@ Install_App()
PATH=${serverPath}/openresty/luajit:${serverPath}/openresty/luajit/include/luajit-2.1:$PATH
export PATH=$PATH:$serverPath/webstats/luarocks/bin
if [ ! -f $serverPath/webstats/lua/lsqlite3.so ];then
if [ "${sys_os}" == "Darwin" ];then
cd $serverPath/source/webstats/lsqlite3_fsl09y
# SQLITE_DIR=/usr/local/Cellar/sqlite/3.36.0
@ -72,6 +77,7 @@ Install_App()
else
cd $serverPath/source/webstats/lsqlite3_fsl09y && make
fi
fi
# copy to code path
DEFAULT_DIR=$serverPath/webstats/luarocks/lib/lua/5.1
@ -80,9 +86,9 @@ Install_App()
cp -rf ${DEFAULT_DIR}/lsqlite3.so $serverPath/webstats/lua/lsqlite3.so
fi
if [ ! -f $serverPath/webstats/GeoLite2-City.mmdb ];then
pip install geoip2
if [ ! -f $serverPath/webstats/GeoLite2-City.mmdb ];then
# pip install geoip2
wget --no-check-certificate -O $serverPath/webstats/GeoLite2-City.mmdb https://git.io/GeoLite2-City.mmdb
fi

Loading…
Cancel
Save