diff options
author | Joe Williams <joe@joetify.com> | 2011-09-20 09:52:59 -0700 |
---|---|---|
committer | Joe Williams <joe@joetify.com> | 2011-09-20 09:52:59 -0700 |
commit | 6656ead0356aaef132a79e9733f74e32725d6e9e (patch) | |
tree | a1a7c429923bd139b27a64d4acdda069d92d38cc /test/upgrade_project/rel | |
parent | 5998c6c721b22a9413c66f2b2b034f9d5bd5bb3d (diff) | |
parent | cb5056b2e362aa0b1eb0ccfc6009613426682ed5 (diff) |
Merge pull request #133 from joewilliams/sysconfig1
Get rid of app.config
Diffstat (limited to 'test/upgrade_project/rel')
-rwxr-xr-x | test/upgrade_project/rel/files/dummy | 16 | ||||
-rw-r--r-- | test/upgrade_project/rel/files/sys.config (renamed from test/upgrade_project/rel/files/app.config) | 1 | ||||
-rw-r--r-- | test/upgrade_project/rel/reltool.config | 4 |
3 files changed, 17 insertions, 4 deletions
diff --git a/test/upgrade_project/rel/files/dummy b/test/upgrade_project/rel/files/dummy index bacce8d..78d6bae 100755 --- a/test/upgrade_project/rel/files/dummy +++ b/test/upgrade_project/rel/files/dummy @@ -50,6 +50,20 @@ ERTS_PATH=$RUNNER_BASE_DIR/erts-$ERTS_VSN/bin # Setup command to control the node NODETOOL="$ERTS_PATH/escript $ERTS_PATH/nodetool $NAME_ARG $COOKIE_ARG" +# Use releases/VSN/sys.config if it exists otherwise use etc/app.config +if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" ]; then + CONFIG_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" +else + CONFIG_PATH="$RUNNER_ETC_DIR/app.config" +fi + +# Use releases/VSN/vm.args if it exists otherwise use etc/vm.args +if [-e "$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" ]; then + VMARGS_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" +else + VMARGS_PATH="$RUNNER_ETC_DIR/vm.args" +fi + # Check the first argument for instructions case "$1" in start) @@ -147,7 +161,7 @@ case "$1" in BINDIR=$ROOTDIR/erts-$ERTS_VSN/bin EMU=beam PROGNAME=`echo $0 | sed 's/.*\\///'` - CMD="$BINDIR/erlexec -boot $RUNNER_BASE_DIR/releases/$APP_VSN/$BOOTFILE -mode embedded -config $RUNNER_ETC_DIR/app.config -args_file $RUNNER_ETC_DIR/vm.args -- ${1+"$@"}" + CMD="$BINDIR/erlexec -boot $RUNNER_BASE_DIR/releases/$APP_VSN/$BOOTFILE -mode embedded -config $CONFIG_PATH -args_file $VMARGS_PATH -- ${1+"$@"}" export EMU export ROOTDIR export BINDIR diff --git a/test/upgrade_project/rel/files/app.config b/test/upgrade_project/rel/files/sys.config index 3b7f6bd..d7677e7 100644 --- a/test/upgrade_project/rel/files/app.config +++ b/test/upgrade_project/rel/files/sys.config @@ -8,4 +8,3 @@ {error_logger_mf_maxfiles, 5} % 5 files max ]} ]. - diff --git a/test/upgrade_project/rel/reltool.config b/test/upgrade_project/rel/reltool.config index 22cec5e..9672abc 100644 --- a/test/upgrade_project/rel/reltool.config +++ b/test/upgrade_project/rel/reltool.config @@ -20,6 +20,6 @@ {copy, "files/erl", "{{erts_vsn}}/bin/erl"}, {copy, "files/nodetool", "{{erts_vsn}}/bin/nodetool"}, {copy, "files/dummy", "bin/dummy"}, - {copy, "files/app.config", "etc/app.config"}, - {copy, "files/vm.args", "etc/vm.args"} + {copy, "files/sys.config", "releases/\{\{rel_vsn\}\}/sys.config"}, + {copy, "files/vm.args", "releases/\{\{rel_vsn\}\}/vm.args"} ]}. |