aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Rascão <[email protected]>2017-10-18 22:43:13 +0100
committerGitHub <[email protected]>2017-10-18 22:43:13 +0100
commit6ab1c19b1c7f3baab66fc69a4f17c833c736ecd9 (patch)
tree07afb55cafef11f4186873d9fbf689d3a8b1f6a9
parent2aba0053cb0241c04fad73e42fb903b95a0581ec (diff)
parentad4df725fd01785dc07a7fea06d03dd039f956a8 (diff)
downloadrelx-6ab1c19b1c7f3baab66fc69a4f17c833c736ecd9.tar.gz
relx-6ab1c19b1c7f3baab66fc69a4f17c833c736ecd9.tar.bz2
relx-6ab1c19b1c7f3baab66fc69a4f17c833c736ecd9.zip
Merge pull request #609 from K2InformaticsGmbH/master
[windows] pass extra arguments from vm.args to service
-rw-r--r--priv/templates/extended_bin_windows13
1 files changed, 13 insertions, 0 deletions
diff --git a/priv/templates/extended_bin_windows b/priv/templates/extended_bin_windows
index 85c57f4..d0c41d8 100644
--- a/priv/templates/extended_bin_windows
+++ b/priv/templates/extended_bin_windows
@@ -56,6 +56,19 @@
:: Write the erl.ini file to set up paths relative to this script
@call :write_ini
+:: Collect any additional VM args into erl_opts
+@setlocal EnableDelayedExpansion
+@for /f "usebackq tokens=1-2" %%I in (`findstr /r "^[^#]" "%vm_args%"`) do @(
+ if not "%%I" == "-name" (
+ if not "%%I" == "-sname" (
+ if not "%%I" == "-setcookie" (
+ set erl_opts=!erl_opts! %%I %%J
+ )
+ )
+ )
+)
+@endlocal && set erl_opts=%erl_opts%
+
:: If a start.boot file is not present, copy one from the named .boot file
@if not exist "%rel_dir%\start.boot" (
copy "%rel_dir%\%rel_name%.boot" "%rel_dir%\start.boot" >nul