Enable multiple gods on one system, run by non-root users. #116
+69
−26
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.
The primary change in this pull request causes god to create and use a socket file in a user-specific directory when /var/run/god is not writable. Without this change, spinning up a second god on a box that already has one running will either clobber the first god's socket file, or fail to create a socket file and die at startup.
With this change, each user on a system can run its own independent god. I've been using this patch since February in order to run staging deployments for multiple apps on one server, while reusing the same god configs that are used in these apps' production deployments.
This pull request also includes tests for the changes.