Overwatch

Utility to help keep a processes running and restart them if they stop.

Overwatch

Perl6 Overwatch can be used to restart programs when they crash or when files are modified.

Usage

overwatch [options] <program> [<program arguments>]

Required

<program>

A program/script name is required.

Options

Executable

-e=<executable> | --execute=<executable>

Default: perl6

The executable that runs the specified .

Keep Alive

-k | --keep-alive

Default: True

Automatically rerun the program.

Exit on error

-x | --exit-on-error

Default: False

Stop overwatch if the exited with a non-zero code.

Git

-g | --git

Default: 0

Checks default upstream git repository and pulls if local is behind.

A value of zero or less disables this option.

Quiet

-q | --quiet

Default: False

Prevents overwatch from printing informative messages to stdout.

Watch

-w | --watch

Default: []

Directories/files to watch for changes, when a file is changed the is restarted.

Filter

-f | --filter

Default: ''

Comma separated list of file extensions to watch for changes. List applies to all watch dirs.

Notes

  • Multiple -w switches may be specified

  • To negate a [True|False] value you can use -/q (same as -q=False)

Process Args

-p | --pargs

Default: []

List of arguments to start the executable with. Example overwatch -p='-e' 'sleep 5' would monitor the process: perl6 -e 'sleep 5'

Examples

overwatch app.pl6
overwatch -w=models mvc.pl6
overwatch -w=/tmp/ -e=/bin/sh shellscript.sh --shellarg=go

License

Artistic License 2.0

Overwatch v0.1.6

Utility to help keep a processes running and restart them if they stop.

Authors

  • Tony O'Dell

License

Dependencies

Shell::Command

Test Dependencies

Provides

  • overwatch

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.