summaryrefslogtreecommitdiff
path: root/priv/templates/simplenode.runner
diff options
context:
space:
mode:
authorMatt Campbell <matthew.campbell@asolutions.com>2012-01-09 16:37:44 -0600
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2012-04-17 19:56:41 +0200
commit6f85854414a51a7ea8ce85f2fb68b77d7d381098 (patch)
treeda95fd3389a149405c1e1769776b6ec10199de1b /priv/templates/simplenode.runner
parent9c1a877bbe514afe20ac3264b87f0764ffb8b243 (diff)
Improvements to windows node runner script
* Typos and other minor bug fixes * Add "attach" command (via -remsh) * Add "upgrade" command to install a hot upgrade package * Add "upgrade" subcommand to UNIX runner script as well
Diffstat (limited to 'priv/templates/simplenode.runner')
-rwxr-xr-xpriv/templates/simplenode.runner24
1 files changed, 23 insertions, 1 deletions
diff --git a/priv/templates/simplenode.runner b/priv/templates/simplenode.runner
index f6d3f6c..be1cc8f 100755
--- a/priv/templates/simplenode.runner
+++ b/priv/templates/simplenode.runner
@@ -149,6 +149,28 @@ case "$1" in
exec $ERTS_PATH/to_erl $PIPE_DIR
;;
+ upgrade)
+ if [ -z "$2" ]; then
+ echo "Missing upgrade package argument"
+ echo "Usage: $SCRIPT upgrade {package base name}"
+ echo "NOTE {package base name} MUST NOT include the .tar.gz suffix"
+ exit 1
+ fi
+
+ # Make sure a node IS running
+ RES=`$NODETOOL ping`
+ ES=$?
+ if [ "$ES" -ne 0 ]; then
+ echo "Node is not running!"
+ exit $ES
+ fi
+
+ node_name=`echo $NAME_ARG | awk '{print $2}'`
+ erlang_cookie=`echo $COOKIE_ARG | awk '{print $2}'`
+
+ $ERTS_PATH/escript $RUNNER_BASE_DIR/bin/install_upgrade.escript $node_name $erlang_cookie $2
+ ;;
+
console|console_clean)
# .boot file typically just $SCRIPT (ie, the app name)
# however, for debugging, sometimes start_clean.boot is useful:
@@ -204,7 +226,7 @@ case "$1" in
exec $CMD -- ${1+"$@"}
;;
*)
- echo "Usage: $SCRIPT {start|foreground|stop|restart|reboot|ping|console|console_clean|attach}"
+ echo "Usage: $SCRIPT {start|foreground|stop|restart|reboot|ping|console|console_clean|attach|upgrade}"
exit 1
;;
esac