-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#71] Add support for "run once" custom script
This commit introduces a new configuration parameter `PGENV_SCRIPT_FIRSTSTART` that can be pointed to an executable that is run once and only once at the very first start of the selected instance. Therefore, the usage of this script enables for customization of the instance, like for example adding new users and databases. The changes are made directly into the `pgenv_start_instance` function, that is the entry point to a start action: the function in turns calls `pgenv_initdb` that performs the initialization of the instace. If the initialization is done, a new magic variable `PGENV_INITDB_DONE` is set to `1`, so that `pgenv_start_instance` can then decide to execute the script mentioned above. Therefore, the trick here is to mark a "first start" time as the one that immediatly follows the initdb phase. Documentation updated. Version number bumped. Close #71
- Loading branch information
Showing
2 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters