Allow custom script execution on installation#1260
Closed
mgerhardy wants to merge 3 commits intonextcloud:masterfrom
Closed
Allow custom script execution on installation#1260mgerhardy wants to merge 3 commits intonextcloud:masterfrom
mgerhardy wants to merge 3 commits intonextcloud:masterfrom
Conversation
prevents volumes from being mounted executable
Contributor
Author
|
one could e.g. do #!/bin/sh
occ() {
php /var/www/html/occ $@
}
# loginname, display name, email, password
createuser() {
export OC_PASS="$4"
occ user:add --password-from-env --display-name="$2" "$1"
unset OC_PASS
occ user:setting "$1" email "$3"
}
for app in contacts calendar; do
occ app:install -n $app
done
createuser user1 "User 1" "user@domain.com" "secrets-mounted-as-docker-or-k8s-secret"mount this to |
J0WI
reviewed
Nov 25, 2021
| fi | ||
|
|
||
| if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then | ||
| run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}" |
Contributor
There was a problem hiding this comment.
I'm fine with this but are there any common use cases where you don't want to run_as limited user?
There was a problem hiding this comment.
The only use case I see may be adding distrib packages, but I think that building a custom image is better here.
Contributor
|
@mgerhardy would you like to rebase this? |
|
Hi, Any news @mgerhardy ? |
|
Hi, @mgerhardy, do you need any help ? Thank ! ;) |
Member
|
See #1683 |
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.
Should fix issues
This allows a custom script to be mounted as docker or kubernetes volume to be executed. This can be used to execute all kind of occ commands.
Alternative and more customizable to the PR #1259