Project

webcmd

0.01
No commit activity in last 3 years
No release in over 3 years
Run shell command through HTTP
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 1.6.3
~> 1.4.1
 Project Readme

Webcmd

Run shell command through HTTP.

Installation

$ gem install webcmd

Usage

Use COMMAND environment variable to specify the command to be runned and TOKEN to protect the HTTP endpoint, e.g.:

$ COMMAND="echo it\'s working" TOKEN="1234" webcmd
Puma 1.6.3 starting...
* Min threads: 0, max threads: 1
* Environment: production
* Listening on tcp://0.0.0.0:9292

You could run curl in other terminal to check whether it's working:

$ curl http://localhost:9292/\?token=1234
it's working

To list available command-line options run:

$ webcmd -h

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request