diff options
author | Jordan Wilberding <[email protected]> | 2014-10-11 11:14:39 -0500 |
---|---|---|
committer | Jordan Wilberding <[email protected]> | 2014-10-11 11:14:39 -0500 |
commit | d4d197ca142913b81fc192357dff18d1ed266921 (patch) | |
tree | 99aa325722ba82a239fd429222371018940af2b7 /priv/templates | |
parent | 5096c28c17ea256f48ce049a43d11b172532e03e (diff) | |
parent | e1b066ee48feba20f515403316df180c32b9adb7 (diff) | |
download | relx-d4d197ca142913b81fc192357dff18d1ed266921.tar.gz relx-d4d197ca142913b81fc192357dff18d1ed266921.tar.bz2 relx-d4d197ca142913b81fc192357dff18d1ed266921.zip |
Merge pull request #229 from Cloven/add_escript_command
Added the 'escript' command to the extended release script
Diffstat (limited to 'priv/templates')
-rw-r--r-- | priv/templates/extended_bin.dtl | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/priv/templates/extended_bin.dtl b/priv/templates/extended_bin.dtl index f38e51a..bca90f3 100644 --- a/priv/templates/extended_bin.dtl +++ b/priv/templates/extended_bin.dtl @@ -53,6 +53,13 @@ relx_nodetool() { -setcookie "$COOKIE" "$command" $@ } +# Run an escript in the node's environment +relx_escript() { + command="$1"; shift + export RELEASE_ROOT_DIR + + "$ERTS_DIR/bin/escript" "$ROOTDIR/$command" $@ +} # Output a start command for the last argument of run_erl relx_start_command() { printf "exec \"%s\" \"%s\"" "$RELEASE_ROOT_DIR/bin/$REL_NAME" \ @@ -222,6 +229,13 @@ case "$1" in fi ;; + escript) + ## Run an escript under the node's environment + if ! relx_escript $@; then + exit $? + fi + ;; + attach) # Make sure a node IS running if ! relx_nodetool "ping" > /dev/null; then @@ -345,7 +359,7 @@ case "$1" in exec "$@" -- "${1+$ARGS}" ;; *) - echo "Usage: $REL_NAME {start|start_boot <file>|foreground|stop|restart|reboot|ping|console|console_clean|console_boot <file>|attach|remote_console|upgrade}" + echo "Usage: $REL_NAME {start|start_boot <file>|foreground|stop|restart|reboot|ping|console|console_clean|console_boot <file>|attach|remote_console|upgrade|escript}" exit 1 ;; esac |