rc: add ${name}_pre_start, ${name}_post_stop script support#2186
Open
rozhuk-im wants to merge 1 commit into
Open
rc: add ${name}_pre_start, ${name}_post_stop script support#2186rozhuk-im wants to merge 1 commit into
rozhuk-im wants to merge 1 commit into
Conversation
|
Thank you for taking the time to contribute to FreeBSD! Some of files have special handling: Important @concussious wants to review changes to share/man/ |
737e6ca to
d0757a6
Compare
Run a service-based pre_start running after setup but before start_precmd and post_stop script running after stop_postcmd. Useful for automatic environment/chroot generation and cleanup. Signed-off-by: Rozhuk Ivan <rozhuk.im@gmail.com>
d0757a6 to
1f61837
Compare
Contributor
|
Hi! So, what's wrong with precmd and postcmd? |
Contributor
Author
|
It is ok, but it is hard to use it to call scripts from rc.conf: It will work only if port does not use it inside rc.d script. Same time after patch it is able to write: where
As administrator of services I want to able to run some code before start and after stop service, this can have many use cases to customize logic outside port, on system level. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run a service-based pre_start running after setup but before start_precmd and post_stop script running after stop_postcmd.
Useful for automatic environment/chroot generation and cleanup.