diff options
author | Tristan Sloughter <[email protected]> | 2017-05-15 11:44:28 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2017-05-15 11:44:28 -0700 |
commit | d3f6f3993a63d564bfdf73aaa6f3ea19f6340bd5 (patch) | |
tree | 0859e7e9a796f69dd26ebc015c8c7b0ca9d5f199 /priv/templates/extended_bin | |
parent | 8120e57a146c220579ab95a5f905755632999a83 (diff) | |
parent | 82f6c94a4d8ef1cf2be0becc5816d0646e5a50cc (diff) | |
download | relx-d3f6f3993a63d564bfdf73aaa6f3ea19f6340bd5.tar.gz relx-d3f6f3993a63d564bfdf73aaa6f3ea19f6340bd5.tar.bz2 relx-d3f6f3993a63d564bfdf73aaa6f3ea19f6340bd5.zip |
Merge pull request #590 from lrascao/feature/extended_start_script_status
Feature/extended start script status
Diffstat (limited to 'priv/templates/extended_bin')
-rwxr-xr-x | priv/templates/extended_bin | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin index f05fb31..ed68748 100755 --- a/priv/templates/extended_bin +++ b/priv/templates/extended_bin @@ -40,12 +40,13 @@ ERL_OPTS="{{ erl_opts }}" RUNNER_LOG_DIR="${RUNNER_LOG_DIR:-$RELEASE_ROOT_DIR/log}" # start/stop/install/upgrade pre/post hooks -PRE_START_HOOKS="{{ pre_start_hooks }}" -POST_START_HOOKS="{{ post_start_hooks }}" -PRE_STOP_HOOKS="{{ pre_stop_hooks }}" -POST_STOP_HOOKS="{{ post_stop_hooks }}" -PRE_INSTALL_UPGRADE_HOOKS="{{ pre_install_upgrade_hooks }}" -POST_INSTALL_UPGRADE_HOOKS="{{ post_install_upgrade_hooks }}" +PRE_START_HOOKS="{{{ pre_start_hooks }}}" +POST_START_HOOKS="{{{ post_start_hooks }}}" +PRE_STOP_HOOKS="{{{ pre_stop_hooks }}}" +POST_STOP_HOOKS="{{{ post_stop_hooks }}}" +PRE_INSTALL_UPGRADE_HOOKS="{{{ pre_install_upgrade_hooks }}}" +POST_INSTALL_UPGRADE_HOOKS="{{{ post_install_upgrade_hooks }}}" +STATUS_HOOK="{{{ status_hook }}}" relx_usage() { command="$1" @@ -101,8 +102,12 @@ relx_usage() { echo " --no-permanent Install release package VERSION but" echo " don't make it permanent" ;; + status) + echo "Usage: $REL_NAME status" + echo "Obtains node status information." + ;; *) - echo "Usage: $REL_NAME {start|start_boot <file>|foreground|stop|restart|reboot|pid|ping|console|console_clean|console_boot <file>|attach|remote_console|upgrade|downgrade|install|uninstall|versions|escript|rpc|rpcterms|eval}" + echo "Usage: $REL_NAME {start|start_boot <file>|foreground|stop|restart|reboot|pid|ping|console|console_clean|console_boot <file>|attach|remote_console|upgrade|downgrade|install|uninstall|versions|escript|rpc|rpcterms|eval|status}" ;; esac } @@ -584,6 +589,15 @@ case "$1" in shift relx_nodetool "eval" $@ ;; + status) + # Make sure a node IS running + if ! relx_nodetool "ping" > /dev/null; then + echo "Node is not running!" + exit 1 + fi + + [ "$SCRIPT_DIR/$STATUS_HOOK" ] && . "$SCRIPT_DIR/$STATUS_HOOK" $@ + ;; help) if [ -z "$2" ]; then relx_usage |