We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 283daef commit 17ba8f8Copy full SHA for 17ba8f8
1 file changed
entrypoint.sh
@@ -2,13 +2,14 @@
2
3
set -e
4
5
-# Drop root privileges if we are running gemstash as root.
6
-if [ "$1" = "bundle" ] && [ "$2" = "exec" ] && [ "$3" = "gemstash" ] && [ "$(id -u)" = "0" ]; then
+# Always run this as gemstash user.
+if [ "$1" = "bundle" ] && [ "$2" = "exec" ] && [ "$3" = "gemstash" ]; then
7
# Change the ownership of user-mutable directories to gemstash
8
chown -R "${GEMSTASH_USER}:${GEMSTASH_USER}" "${GEMSTASH_HOME}/data"
9
10
- # Run gemstash as gemstash user
+ # Specify config to be used by gemstash.
11
command="tini -- ${*} --config-file=${GEMSTASH_HOME}/app/config.yml.erb"
12
+ # Run gemstash as gemstash user
13
set -- su-exec "${GEMSTASH_USER}" ${command}
14
fi
15
0 commit comments