Do Or Die (DOD) is a simple program that executes 'checks', and can then execute commands whether the check was successful or not.
For example, it can be used to monitor a host and reboot it remotely if it crashes, or could be used to send an email if a web page changes.
~/.dod/config.yml) contains parameters for one or multiple checks.true), a command is optionally run.false), a command is optionally run.See config.yml.example for a sample configuration file.
Commands can be either a path to an executable shell script or program (ie: ~/bin/myscript.sh), or pure Ruby code (ie: File.exists?('/tmp/foobar.txt')).
Shell commands are automatically detected if they start with a /, ~, or ., such as: /bin/ls, ~/bin/script or ./foobar.sh.
See Help:
./do-or-die --help
Ping a host.
ping '10.0.0.55'
Shell out and execute shell commands.
shell 'dig www.google.com'
Checks if a given URL returns 200.
http_ok? 'http://www.mywebsite.com'
For your convenience, DoD included the tplink_smarthome_api Ruby Gem.
The easiest way to deploy DOD is to use the Docker image.
tplink-smarthome-api package (only if you plan on using TP-Link SmartHome commands)Content type
Image
Digest
Size
51.6 MB
Last updated
over 7 years ago
docker pull cmer/do-or-die