Last active
March 29, 2022 00:24
-
-
Save plavjanik/3d38662a18f4651cba8f8fb0231daf91 to your computer and use it in GitHub Desktop.
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
| #!/bin/bash | |
| set -e | |
| echo "Called with: $@" > zowe-init.log | |
| if [[ "$1" == "zowe-init" || "$1" == "cat" ]]; then | |
| # Start the gnome keyring daemon when a bash session is initialized (requires passing `--privileged` or `--cap-add ipc_lock` when calling `docker run`): | |
| [ -z "$GNOME_KEYRING_CONTROL" ] && RND=$(openssl rand -base64 32) && eval $(echo "$RND" | gnome-keyring-daemon --unlock --components=secrets >> zowe-init.log | sed -e "s/^/export /g") | |
| # Calling Zowe CLI to initialize daemon mode: | |
| zowe --version >> zowe-init.log | |
| cat # Prevents terminating the container on the `docker run` command | |
| else | |
| exec "$@" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment