confluentinc / confluent-docker-utils

Common Python utils for testing Confluent's Docker images
Apache License 2.0
3 stars 5 forks source link

Add dub path-wait command #2

Closed codyaray closed 6 years ago

codyaray commented 6 years ago

File exists:

$ dub path-wait /etc/ssh/sshd_config 40
$ echo $?
0

File doesn't exist:

$ dub path-wait /etc/ssh/sshd_config2 40
/etc/ssh/sshd_config2 does not exist
Command [/usr/local/bin/dub path-wait /etc/ssh/sshd_config2 40] FAILED !
$ echo $?
1

File created while waiting:

$ dub path-wait /etc/ssh/sshd_config2 40 &
[1] 59660
$ sudo touch /etc/ssh/sshd_config2
$ fg
-bash: fg: job has terminated
[1]+  Done                    dub path-wait /etc/ssh/sshd_config2 40