二、安装lua-resty-shell git clone https://github.com/juce/lua-resty-shell 复制shell.lua 文件到自己的项目库中去 /home/tinywan/Openresty_Protect/First_Protect/lualib/resty sudo cp/home/tinywan/lua-resty-shell/lib/resty/shell.lua ./ 三、测试Lua执行shell 命令 nginx.conf 配置 #shell location/s...
git clone https:///juce/lua-resty-shell 1. 复制shell.lua 文件到自己的项目库中去 /home/tinywan/Openresty_Protect/First_Protect/lualib/resty sudo cp /home/tinywan/lua-resty-shell/lib/resty/shell.lua ./ 1. 2. 3. 三、测试Lua执行shell 命令 nginx.conf 配置 # shell location /shell_test {...
已经写过一个openresty 使用lua-resty-shell 执行shell 脚本的demo,但是实际上我们可能是多节点运行, 同时需要负载均衡的机制。 lua-resty-shell 支持unix socket 以及tcp soket 的管理,但是在测试的时候发现tcp 有问题,所以只好 使用unix socket了,通过nginx 的stream 将unix 转为tcp,因为是测试,使用docker-compose ...
二、安装lua-resty-shell git clone https://github.com/juce/lua-resty-shell 复制shell.lua 文件到自己的项目库中去 /home/tinywan/Openresty_Protect/First_Protect/lualib/resty sudo cp/home/tinywan/lua-resty-shell/lib/resty/shell.lua ./ 三、测试Lua执行shell 命令 nginx.conf 配置 #shell location/s...
local shell = require "resty.shell" local stdin = "hello" local timeout = 1000 -- ms local max_size = 4096 -- byte local ok, stdout, stderr, reason, status = shell.run([[perl -e 'warn "he\n"; print <>']], stdin, timeout, max_size) if not ok then -- ... end...
1. openresty官方内置的lua-resty-shell扩展模块 2. 麻省理工Juce版本 这两种版本,第一种内置版本需要OpenResty版本5.0以后才支持,对于老版本的openresty需要做升级处理。第二种Juce版,支持所有版本的openresty,但需要做一定的配置。两种版本的性能差异暂时没有测试,选择哪种版本需根据自身的实际情况来做...
lua-resty-shell 多任务执行 lua-resty-shell 多任务执行 已经写过一个openresty 使用lua-resty-shell 执行shell 脚本的demo,但是实际上我们可能是多节点运行, 同时需要负载均衡的机制。 lua-resty-shell 支持unix socket 以及tcp soket 的管理,但是在测试的时候发现tcp 有问题,所以只好...
openresty/lua-resty-shellPublic Notifications Fork19 Star125 Code Issues7 Pull requests Actions Projects Security Insights Files master lib t .gitignore .travis.yml Makefile README.md valgrind.suppress agentzh and spacewander first implementation. ...
提交Issue,填表就好 内容必填选填?你说了算! 精准反馈,高效沟通 4月19日,AI 开发者集结!和模力方舟相约贵州首届 AI 开发者大会,点击立即报名 Watch 1Star0Fork0 leenhem/lua-resty-shell 标签 Tags Releases 功能基于仓库中的历史标记 建议使用类似 V1.0 的版本标记作为 Releases 点。
lua-resty-shell扩展库 一、介绍: 用于非阻塞的执行shell命令的Lua模块 简单说就是我们可以通过OpenResty实现远程执行shell命令,并且执行调用过程是非阻塞的。 二、用法: lua-resty-shell 扩展模块有两个不同的版本(两个版本的使用方式不同) 1. openresty官方内置的lua-resty-shell扩展模块 ...