jeffbski / wait-on

wait-on is a cross-platform command line utility and Node.js API which will wait for files, ports, sockets, and http(s) resources to become available
MIT License
1.87k stars 77 forks source link

Suggestion: wait-on systemd / ps aux #71

Open slavaGanzin opened 4 years ago

slavaGanzin commented 4 years ago

Currently to wait for a process to be up you can write while loop:

while `ps aux | grep [p]ostgres`; do sleep 1s; done #syntax i should always google

But it would be nifty to do it like:

wait-on process:postgres for ps | grep alike and wait-on systemd:postges for systemctl status postgres.service | grep running

As a proposed solution for: https://github.com/jeffbski/wait-on/issues/15