aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2015-01-30 15:54:16 -0600
committerTristan Sloughter <[email protected]>2015-01-30 15:54:23 -0600
commit67246095cf5e7ad0a978cc69c62c5429ec423b56 (patch)
tree31c64681c0271b2f8e90bb613aef32e28ed5145e /priv/templates
parente6e3b8d74e0c5d0c3eedc74f256ec7749c9309a0 (diff)
downloadrelx-67246095cf5e7ad0a978cc69c62c5429ec423b56.tar.gz
relx-67246095cf5e7ad0a978cc69c62c5429ec423b56.tar.bz2
relx-67246095cf5e7ad0a978cc69c62c5429ec423b56.zip
expose rpc and rpcterms functionality from extended bins script
Diffstat (limited to 'priv/templates')
-rw-r--r--priv/templates/extended_bin.dtl25
1 files changed, 24 insertions, 1 deletions
diff --git a/priv/templates/extended_bin.dtl b/priv/templates/extended_bin.dtl
index 87f69ba..005475a 100644
--- a/priv/templates/extended_bin.dtl
+++ b/priv/templates/extended_bin.dtl
@@ -391,8 +391,31 @@ case "$1" in
# Start the VM
exec "$@" -- ${1+$ARGS}
;;
+ rpc)
+ # Make sure a node IS running
+ if ! relx_nodetool "ping" > /dev/null; then
+ echo "Node is not running!"
+ exit 1
+ fi
+
+ shift
+
+ relx_nodetool rpc $@
+ ;;
+ rpcterms)
+ # Make sure a node IS running
+ if ! relx_nodetool "ping" > /dev/null; then
+ echo "Node is not running!"
+ exit 1
+ fi
+
+ shift
+
+ relx_nodetool rpcterms $@
+ ;;
+
*)
- echo "Usage: $REL_NAME {start|start_boot <file>|foreground|stop|restart|reboot|pid|ping|console|console_clean|console_boot <file>|attach|remote_console|upgrade|escript}"
+ echo "Usage: $REL_NAME {start|start_boot <file>|foreground|stop|restart|reboot|pid|ping|console|console_clean|console_boot <file>|attach|remote_console|upgrade|escript|rpc|rpcterms}"
exit 1
;;
esac