小修改

This commit is contained in:
zjcqoo 2019-05-14 17:43:34 +08:00
parent 6ec1fdc6d8
commit faa76c0257
4 changed files with 7 additions and 11 deletions

View File

@ -1,15 +1,13 @@
#!/usr/bin/env bash
# 功能:安装 brotli 压缩工具
# 依赖cmakeyum install -y cmake
git clone --depth 1 https://github.com/google/brotli.git
cd brotli
./configure-cmake
make
mkdir -p ~/tools
mv brotli ~/tools
mv bin/brotli ~/tools
cd ..
rm -rf brotli

View File

@ -2,10 +2,11 @@
# 功能:定时调用 backup.sh
echo "log svc running"
CUR_DIR=$(cd `dirname $0` && pwd)
# 也可用 crontab
while true
do
./backup.sh
$CUR_DIR/backup.sh
sleep 60
done

View File

@ -16,6 +16,9 @@ local function buildDevTrafficFn(dev)
return function(str)
local m = ngx.re.match(str, regex, 'oi')
if m == nil then
return '0,0'
end
local sRxBytes = m[1]
local sTxBytes = m[2]

8
run.sh
View File

@ -1,10 +1,4 @@
NGX_BIN=/home/jsproxy/openresty/nginx/sbin/nginx
# local test
if [ ! -f $NGX_BIN ]; then
NGX_BIN=/usr/local/openresty/nginx/sbin/nginx
fi
NGX_BIN=$HOME/openresty/nginx/sbin/nginx
CUR_DIR=$(cd `dirname $0` && pwd)
if [ $1 ]; then