定制 loandbeholdru/pipe 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

loandbeholdru/pipe

Composer 安装命令:

composer require loandbeholdru/pipe

包简介

Classes to run shell commands trow linux pipe

README 文档

README

It's small and lightweight pack to run shell script throw command pipe (bus). So useful to build webhooks on top of docker-container with shell scripts and link them with REST Api.

You no longer need to learn fancy package configurations for webhooks. Use the usual tools.

Installation

It's recommended that you use Composer to install shorts.

$ composer require loandbeholdru/pipe

Usage

Create pipe on host with php and give rights to read it on host with executing scripts (docker-composer example):

mkfifo /tmp/pipefile

On host/container with shell-scripts run main execution script:

./serve.sh [path_to_pipe] [path_to_reaction_dir]

Create command:

$command = new pipecommand("/tmp/pipefile", "/some/path/script_with_two_params.sh %s %s", $par1, $par2);

Create result trap:

$result = new piperesult("/tmp/pipefile", new brokenPipeException("When pipe not working!"));

Execute your command and get $strings from your shell-script:

$strings = pipe::exec($command, $result, new bashCommandErrorException("When your script return error!"));

Contributions

... are always welcome. Many times it is useful to just point out a use case the author have not thought about or come across.

统计信息

  • 总下载量: 63
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固