diff options
author | Tristan Sloughter <[email protected]> | 2016-11-26 11:07:50 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2016-11-26 11:07:50 -0800 |
commit | 1014374d82f783c9da82eecf424c34bceb9fc293 (patch) | |
tree | ccfbd1bef3f2e3e2fc0b21bc2652b5a9132d1ff9 /priv/templates/builtin_hook_wait_for_process | |
parent | c305c89713abf48570e2db152b367f00ac641893 (diff) | |
parent | 3905d39d180efe125b9ef5351d1c3b27a3f825b0 (diff) | |
download | relx-1014374d82f783c9da82eecf424c34bceb9fc293.tar.gz relx-1014374d82f783c9da82eecf424c34bceb9fc293.tar.bz2 relx-1014374d82f783c9da82eecf424c34bceb9fc293.zip |
Merge pull request #445 from lrascao/feature/extended_script_hooks
Add support for new relx directive that provides start/stop script hooks
Diffstat (limited to 'priv/templates/builtin_hook_wait_for_process')
-rw-r--r-- | priv/templates/builtin_hook_wait_for_process | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/priv/templates/builtin_hook_wait_for_process b/priv/templates/builtin_hook_wait_for_process new file mode 100644 index 0000000..af5994d --- /dev/null +++ b/priv/templates/builtin_hook_wait_for_process @@ -0,0 +1,17 @@ +#!/bin/bash + +# loop until the VM starts responding to pings +while ! $(relx_nodetool "ping">/dev/null) +do + sleep 1 +done + +# loop until the name provided as argument gets +# registered +while true +do + if [ "$(relx_nodetool eval "whereis($1).")" != "undefined" ] + then + break + fi +done |