zero dependency commandline tool to orchestrate execution
npm install wait-clizero dependency commandline tool to orchestrate execution
`` bash`
$ npm install -g wait-cli
bash
$ await [options] <...arguments>
`
$3
Awaiting tcp connection(s) to specified addressesOptions:
-
-s, --sequenced - Next connection waits for complete previous connection
- --not - Condition negation flagExample:
await tcp google.com:443$3
Awaiting finishing command executionOptions:
-
-r, --retry - retry on non zero exit code of command
- -s, --sequenced - next command waits for complete previous command
- --not - Condition negation flagExample:
await cmd "curl -sL https://my-domain.never/app-setup.sh | bash -" "app run" --retry --sequenced$3
Awaiting existing specified pathOptions:
-
-s, --sequenced - next existing check waits for complete previous existing check
- -m, --mode - access mode of path r-read, w-write, e-execute
- --not - Condition negation flagExample:
await exists "/var/database.pid" "/var/application.pid" --sequenced --mode r$3
Awaiting for network adapterOptions:
-
-m, --mac - specify mac address mask
- -i, --internal - network adapter should be internal
- --not - Condition negation flagExample:
await network vmnet --mac 00:* --internal
$3
Awaiting for specified secondsExample:
await time 20More Await Examples
- MongoDB - await tcp localhost:27017
- MySQL - await tcp localhost:3306
- MSSQL - await tcp localhost:1433
- HTTP - await tcp localhost
- HTTPS - await tcp localhost:443
- Memcache - await tcp localhost:11211
- Stopping MSSQL - await tcp --not localhost:1433
- Downloading complete (even with errors) - await cmd "wget https://mydomain.com/superscript.sh"
- Downloading complete (retry on fail) - await cmd "wget https://mydomain.com/superscript.sh" --retry
- Script execution complete - await cmd "sh superscript.sh"
- Downloading complete and success script execution - await cmd "wget https://mydomain.com/superscript.sh" "sh superscript.sh" --sequenced
- 20 Seconds - await time 20`