mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-02-24 09:48:14 +00:00
chore: 1/6 - Inline failure at it's cause
This change has been split into 6 iterative parts/commits to ease the review process.
This commit is contained in:
parent
ac066a73e4
commit
8aacd13241
@ -41,7 +41,11 @@ if [[ $DOCKER_HOST = unix://* ]]; then
|
||||
Typically you should run your nginxproxy/nginx-proxy with: \`-v /var/run/docker.sock:$socket_file:ro\`
|
||||
See the documentation at http://git.io/vZaGJ
|
||||
EOT
|
||||
socketMissing=1
|
||||
|
||||
# If the user has run the default command and the socket doesn't exist, fail
|
||||
if [ "$1" = forego ] && [ "$2" = start ] && [ "$3" = '-r' ]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -61,9 +65,4 @@ elif [[ $RESOLVERS =~ $SCOPED_IPV6_REGEX ]]; then
|
||||
RESOLVERS=$(echo "$RESOLVERS" | sed -r "s/$SCOPED_IPV6_REGEX//g" | xargs echo -n); export RESOLVERS
|
||||
fi
|
||||
|
||||
# If the user has run the default command and the socket doesn't exist, fail
|
||||
if [ "$socketMissing" = 1 ] && [ "$1" = forego ] && [ "$2" = start ] && [ "$3" = '-r' ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user