Skip to content

Commit 31d14b6

Browse files
author
Andrei Zavada
committed
refresh install_upgrade_escript from relx-4.5, reenable versions option
1 parent 2c05217 commit 31d14b6

File tree

2 files changed

+270
-64
lines changed

2 files changed

+270
-64
lines changed

priv/bin_script

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,20 @@ case "$1" in
451451
relx_nodetool rpcterms $@
452452
;;
453453

454+
versions)
455+
if ! relx_nodetool "ping" > /dev/null; then
456+
echo "Node is not running!"
457+
exit 1
458+
fi
459+
460+
COMMAND="$1"; shift
461+
462+
exec "$BINDIR/escript" "$ROOTDIR/bin/install_upgrade.escript" \
463+
"versions" "{'$REL_NAME', \"$NAME_TYPE\", '$NAME', '$COOKIE'}" "$@"
464+
;;
465+
454466
*)
455-
echo "Usage: $REL_NAME {start|start_boot <file>|foreground|stop|restart|reboot|pid|ping|console|console_clean|console_boot <file>|attach|remote_console|upgrade|config|escript|rpc|rpcterms}"
467+
echo "Usage: $REL_NAME {start|start_boot <file>|foreground|stop|restart|reboot|pid|ping|console|console_clean|console_boot <file>|attach|remote_console|upgrade|config|escript|rpc|rpcterms|versions}"
456468
exit 1
457469
;;
458470
esac

0 commit comments

Comments
 (0)