Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify switch_spark_if_root
  • Loading branch information
Yikun committed Oct 17, 2022
commit eb9fe82b2fb6d2d0240878ad9c9b66b334c63dec
5 changes: 2 additions & 3 deletions 3.3.0/scala2.12-java11-python3-r-ubuntu/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ case "$1" in
;;
esac

# Switch to spark if no USER specified (root by default) otherwise use USER directly
switch_spark_if_root() {
if [ $(id -u) -ne 0 ]; then
return
else
if [ $(id -u) -eq 0 ]; then
echo gosu spark
fi
}
Expand Down
5 changes: 2 additions & 3 deletions 3.3.0/scala2.12-java11-python3-ubuntu/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ case "$1" in
;;
esac

# Switch to spark if no USER specified (root by default) otherwise use USER directly
switch_spark_if_root() {
if [ $(id -u) -ne 0 ]; then
return
else
if [ $(id -u) -eq 0 ]; then
echo gosu spark
fi
}
Expand Down
5 changes: 2 additions & 3 deletions 3.3.0/scala2.12-java11-r-ubuntu/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ case "$1" in
;;
esac

# Switch to spark if no USER specified (root by default) otherwise use USER directly
switch_spark_if_root() {
if [ $(id -u) -ne 0 ]; then
return
else
if [ $(id -u) -eq 0 ]; then
echo gosu spark
fi
}
Expand Down
5 changes: 2 additions & 3 deletions 3.3.0/scala2.12-java11-ubuntu/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ case "$1" in
;;
esac

# Switch to spark if no USER specified (root by default) otherwise use USER directly
switch_spark_if_root() {
if [ $(id -u) -ne 0 ]; then
return
else
if [ $(id -u) -eq 0 ]; then
echo gosu spark
fi
}
Expand Down