Git Product home page Git Product logo

errbot-sysctl's Introduction

err-shellexec

A plugin for ErrBot that allows you to create a directory of shell scripts that will each represent a single bot command. The plugin will dynamically create an additional pluging which it manages. The dynaic plugin will have methods on it that each represent one of the shell scripts in the directory specified in the config.

Config options

  • SCRIPT_PATH: The path on the file system where the scripts reside
  • SCRIPT_LOGS: The path on the file system where logs of each script run should reside.

Example

If you configure your bot with a SCRIPT_PATH of '/usr/local/scripts/' and a SCRIPT_LOGS of '/var/logs/bog/', and the path '/usr/local/scripts' contains 4 files:

  • deploy_fun.sh
  • deploy_now.sh
  • restart__system.sh
  • cry.sh

Then the dynamic plugin ShellCmd will have 4 methods:

  • deploy_fun: !deploy fun
  • deploy_now: !deploy now
  • restart_systems !restart systems
  • cry: !cry

The bot will tell you when the command finishes executing.

TODO

Create a way for the executed scripts to communicate specific info back to the bot for relay to the chat channel in real time.

This plugin is still a work in progress, but has reached a vaguely usable state.

errbot-sysctl's People

Contributors

didiersmith avatar gbin avatar optumsoft-bot avatar sarlalian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.