aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates
AgeCommit message (Collapse)Author
2018-02-15Add extra args from vm.args into escripts and erlAlexander Petrovsky
2018-01-02Clarify that extension scripts shall exitLuca Favatella
2017-11-21Revert "Only print lines for os var that are set"Tristan Sloughter
2017-11-20Windows: support remote_console, fix attachFred Hebert
On Linux, 'attach' uses named pipes, and 'remote_console' uses -remsh. The latter is usually deemed better since named pipes require a call to fsync on every line written. On Windows, no named pipes are available so attach uses -remsh directly. Historically, remote_console was added to linux *after* attach, but no alias was added for it on windows. Since there's a predominance of tutorials using linux-likes, remote_console is widely documented as the way to go, and is unavailable on windows. This is hella confusing. So to work around that, this patch adds an alias for 'attach' on windows to be 'remote_console', bridging the gap. Also the functionality was flat out broken because it would not use a node hostname when connecting out. Since the latest release added that functionality, this patch also fixes attach to work in the first place.
2017-11-17Fix release upgrades on WindowsFred Hebert
Some tool calls were outdated, and in some cases, relied on non-existing features there.
2017-11-01Support OTP-20 Unicode functionsFred Hebert
Use either optional compilation or version-safe variants of the string functions. Prevents warnings when the switch to OTP-21 will happen.
2017-10-30Fix printf statement. Backslash is not necessary and dash is picky about itLuke Bakken
2017-10-30Add test that demonstrates that fixes preserve an argument that contains ↵Luke Bakken
both double quotes and a space character
2017-10-25Correctly construct HEART_COMMAND and run_erl argumentsLuke Bakken
The runner script that ships with rebar builds HEART_COMMAND and run_erl arguments that preserve additional arguments the user may have passed: https://github.com/rebar/rebar/blob/master/priv/templates/simplenode.runner#L215-L238 This PR preserves this behavior. In additon, the current code on this line sets $@ but does not do anything with the result: https://github.com/erlware/relx/blob/master/priv/templates/extended_bin#L481-L482 Investigated in response to this ML thread: http://erlang.org/pipermail/erlang-questions/2017-October/093974.html
2017-10-19Only print lines for os var that are setAnthony Jackson
2017-10-19Merge pull request #616 from koctep/add_boot_var_ERTS_LIB_DIRLuis Rascão
Add boot_var ERTS_LIB_DIR to relx_get_nodename
2017-10-18Start script extensions (#613)Luis Rascão
* Extended start script command extensions Provide a mechanism that allows for the application to extend the list of commands available to be invoked from the start script. An application may be able to define a 'foo' extension that is associated with a 'foo_script' written and maintained by the applicationr, (this association is kept in rebar.config), upon invocation of bin/<release_name> foo the 'foo_script' will then be invoked. * Add test coverage for extension script * Ensure extended script usage argument
2017-10-19Add boot_var ERTS_LIB_DIR to relx_get_nodenameIlya Ashchepkov
2017-10-18Merge pull request #609 from K2InformaticsGmbH/masterLuis Rascão
[windows] pass extra arguments from vm.args to service
2017-10-17Merge pull request #610 from juhlig/patch-1Luis Rascão
vm.args check for name/sname parameter
2017-10-17more sophisticated args_file checksJan Uhlig
- distinction between non-existing and existing but non-readable args_file - fixed circularity check to include the base vm.args file
2017-10-16Augmented vm.args checksJan Uhlig
vm.args and referenced args_files will now be checked for: - non-existing -args_files - circular dependencies between -args_files - relative paths in -args_files - multiple/mixed occurences of -name and -sname parameters - missing -name or -sname parameters
2017-10-11disabling progress reports during erl root check in extended start scriptConstantine Povietkin
2017-10-06fixed indentationJan Uhlig
2017-10-06fix for OSX awkJan Uhlig
usage of \s in awk regexp is a gawk extension. OSX comes with a different variant of awk. This fix should make the awk code POSIX-compliant and should work in all variants of awk (tested with gawk --traditional)
2017-10-05vm.args check for name/sname parameterJan Uhlig
The current version of extended_bin checks if there is a name or sname parameter in vm.args and refuses to start if there is none. However, it is allowed that the vm.args file (more abstract, any -args_file that is given to erl/erlexec etc) itself may contain -args_file parameters (see http://erlang.org/doc/man/erl.html), which may contain the name/sname parameters. This change will recursively scan the files mentioned in -args_file parameters in vm.args as well as -args_file parameters in the mentioned files etcetc, and return the first occurence of a name/sname parameter. Two points are worth mentioning, though: - The name/sname check works only with absolute paths in the args_file parameters. Relative paths are probably a bad idea there, anyway, since it would make any setup rather fragile. - There is no check for circular dependencies. There was none before, and this change does not add any.
2017-09-26reverted ini deletionBikram Chatterjee
2017-09-26reverted ini file delete, extra args from vm.argsBikram Chatterjee
2017-09-26Merge remote-tracking branch 'upstream/master'Bikram Chatterjee
2017-09-19PIPE_DIR handlingJan Uhlig
As mentioned in the (closed) issue #127, the default pipe directory is not multi-user friendly. When running multiple relx-generated releases as different users, the first to be started will create the /tmp/erl_pipes directory, which the ones starting after that cannot create their pipe dirs in. The ticket mentions that this should be fixed by #154, but I cannot see how this is supposed to solve the issue. Right now, the only way I see is to use prefix the start command with env PIPE_DIR=/some/other/dir/, which is quite cumbersome. This change will work exactly as before when PIPE_DIR is explicitly set. In case PIPE_DIR is not set, however, it will first attempt to create the parent dir /tmp/erl_pipes with mode 1777, which should enable releases being run as other users to create their pipe dirs.
2017-09-12Remove erl.ini on the extended windows script to move erts freely.Agustin Cautin
2017-09-12Do not write erl.ini file with absolute path pointing to the build location.Agustin Cautin
2017-09-11Prevent .erlang from prepending string to the erl root dirbitnitdit
Any output string from .erlang to stdout will be prepend to code:root_dir(), so it will cause the retrieved dir incorrect. The fix is to start erl with the no_dot_erlang boot file.
2017-09-06extra flags from vm.args to erlsrvBikram Chatterjee
2017-07-20Don't fail status script command if emptyLuis Rascao
2017-07-05Fixing windows paths for bin scriptsFred Hebert
The syntax for proper path handling when the path may contain parentheses (such as C:\Program Files (x86)\...) requires quoting the entire assignment expression: set "var=%val%" any other way of doing it may interpret the parentheses and cause failures.
2017-06-06when calling the new install_upgrade.escript, the first parameter needs to ↵Brian Modra
be 'install' or 'unpack'
2017-05-15Add custom status hook to extended scriptLuis Rascao
Provide a status command to start script which, by default, runs a builtin hook that simply prints which applications are running in the node. This hook can then be customized to print whatever the user wants by adding {status, [{custom, "path/to/hook"}]} to already existing extended_start_script_hooks.
2017-05-15Ensure mustache does not html escape hook invocationsLuis Rascao
2017-05-12Don't require compiler in the release for relupsLoïc Hoguin
2017-03-14Merge pull request #579 from lrascao/fix/osx_readlinkTristan Sloughter
Fix OSX readlink
2017-03-12Fix OSX readlinkLuis Rascao
It does not support the -f option.
2017-03-11Only use multi-node sys.config if requested when replacing OS varsLuis Rascao
When replacing OS vars only create multi-node sys.config files (ie. filenames containing the node name) only if explicitly requested. This is necessary because inclusion of other config files inside of sys.config is only allowed if the file is actually called sys.config and nothing else.
2016-12-18Obtain release node name from Erlang VM instead of OSLuis Rascao
2016-11-26Merge pull request #536 from lrascao/fix/downgrade_non_permanent_versionTristan Sloughter
Allow upgrade/downgrade from non-permanent versions
2016-11-12Add support for new relx directive that provides start/stop shell script hooksLuis Rascao
New 'extended_start_script_hooks' directive that allows the developer to define six different hook shell scripts to be invoked at pre/post start/stop/install upgrade phases. Besides these custom defined scripts, other types of builtin scripts are also available, these offer pre-packaged functionality that can be used directly, they are: pid - writes the beam pid to a configurable file location (/var/run/<rel_name>.pid by default). wait_for_vm_start - waits for the vm to start (ie. when it responds to pings) wait_for_process - waits for a configurable name to appear in the erlang process registry The hook scripts are invoked with the 'source' command, therefore they have access to all the variables in the start script.
2016-11-11Allow upgrade/downgrade from non-permanent versionsLuis Rascao
Now that you can upgrade to a new version without setting it as permanent you should also be able to downgrade from it, this allows downgrading or upgrading to a version that is already marked as permanent but is not actually currently running.
2016-11-11Refactor foreground commandLuis Rascao
Move it next to console since it's mostly the same thing but with extra parameters.
2016-11-09Remove name collisions of replaced files in multi-node setupsSerge Aleynikov
2016-10-30Allow optionally setting a release as permanent after relupLuis Rascao
Support a command line argument to the `upgrade`/`downgrade` commands: `--no-permanent`, if this is set the release will be unpacked, installed and be made current but not permanent, when the user is confortable with the outcomehe can issue the same command a second time without the `--no-permanent` option.
2016-10-30Provide per-command command line helpLuis Rascao
2016-10-31add versions in command helpsoranoba
2016-10-31Support the uninstall command. (release_handler:remove_release/1)soranoba
2016-10-30Fix head mismatchLuis Rascao
2016-10-29Allow for a more flexible relup package locationLuis Rascao
Instead of forcing the user to put the tarball package with the expected name (<relname>.tar.gz)and in the expected location (releases/<version>) symlink this fixed file name to a tarball existing in one of three different places (releases/, releases/<version>, releases/<version>/<relname>.tar.gz). Refactor the install/upgrade escript to make it more dynamic, it now runs commands that are passed from the start script while accepting a variable number of arguments. Add a `versions` command to the extended start script that prints out the currently installed versions and their status.