aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates/extended_bin
diff options
context:
space:
mode:
Diffstat (limited to 'priv/templates/extended_bin')
-rwxr-xr-xpriv/templates/extended_bin62
1 files changed, 61 insertions, 1 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin
index 0881a08..63a46d1 100755
--- a/priv/templates/extended_bin
+++ b/priv/templates/extended_bin
@@ -31,6 +31,57 @@ REL_DIR="$RELEASE_ROOT_DIR/releases/$REL_VSN"
ERL_OPTS="{{ erl_opts }}"
RUNNER_LOG_DIR="${RUNNER_LOG_DIR:-$RELEASE_ROOT_DIR/log}"
+relx_usage() {
+ command="$1"
+
+ case "$command" in
+ unpack)
+ echo "Usage: $REL_NAME unpack [VERSION]"
+ echo "Unpacks a release package VERSION, it assumes that this"
+ echo "release package tarball has already been deployed at one"
+ echo "of the following locations:"
+ echo " releases/<relname>-<version>.tar.gz"
+ echo " releases/<version>/<relname>-<version>.tar.gz"
+ echo " releases/<version>/<relname>.tar.gz"
+ ;;
+ install)
+ echo "Usage: $REL_NAME install [VERSION]"
+ echo "Installs a release package VERSION, it assumes that this"
+ echo "release package tarball has already been deployed at one"
+ echo "of the following locations:"
+ echo " releases/<relname>-<version>.tar.gz"
+ echo " releases/<version>/<relname>-<version>.tar.gz"
+ echo " releases/<version>/<relname>.tar.gz"
+ ;;
+ uninstall)
+ echo "Usage: $REL_NAME uninstall [VERSION]"
+ echo "Uninstalls a release VERSION, it will only accept"
+ echo "versions that are not currently in use"
+ ;;
+ upgrade)
+ echo "Usage: $REL_NAME upgrade [VERSION]"
+ echo "Upgrades the currently running release to VERSION, it assumes"
+ echo "that a release package tarball has already been deployed at one"
+ echo "of the following locations:"
+ echo " releases/<relname>-<version>.tar.gz"
+ echo " releases/<version>/<relname>-<version>.tar.gz"
+ echo " releases/<version>/<relname>.tar.gz"
+ ;;
+ downgrade)
+ echo "Usage: $REL_NAME downgrade [VERSION]"
+ echo "Downgrade the currently running release to VERSION, it assumes"
+ echo "that a release package tarball has already been deployed at one"
+ echo "of the following locations:"
+ echo " releases/<relname>-<version>.tar.gz"
+ echo " releases/<version>/<relname>-<version>.tar.gz"
+ echo " releases/<version>/<relname>.tar.gz"
+ ;;
+ *)
+ 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}"
+ ;;
+ esac
+}
+
find_erts_dir() {
__erts_dir="$RELEASE_ROOT_DIR/erts-$ERTS_VSN"
if [ -d "$__erts_dir" ]; then
@@ -460,8 +511,17 @@ case "$1" in
shift
relx_nodetool "eval" $@
;;
+ help)
+ if [ -z "$2" ]; then
+ relx_usage
+ exit 1
+ fi
+
+ TOPIC="$2"; shift
+ relx_usage $TOPIC
+ ;;
*)
- 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}"
+ relx_usage
exit 1
;;
esac