Fixed path for sed(1).
Some distros provide it in /bin/sed and others in both /bin/sed
and /usr/bin/sed. Use the more available one.
Reported-by: Konstantin Pavlov <thresh@nginx.com>
Fixes: ac64ffde57 "Improved readability of <docker-entrypoint.sh>."
Signed-off-by: Alejandro Colomar <alx@nginx.com>
This commit is contained in:
@@ -5,7 +5,7 @@ set -e
|
|||||||
curl_put()
|
curl_put()
|
||||||
{
|
{
|
||||||
RET=$(/usr/bin/curl -s -w '%{http_code}' -X PUT --data-binary @$1 --unix-socket /var/run/control.unit.sock http://localhost/$2)
|
RET=$(/usr/bin/curl -s -w '%{http_code}' -X PUT --data-binary @$1 --unix-socket /var/run/control.unit.sock http://localhost/$2)
|
||||||
RET_BODY=$(echo $RET | /usr/bin/sed '$ s/...$//')
|
RET_BODY=$(echo $RET | /bin/sed '$ s/...$//')
|
||||||
RET_STATUS=$(echo $RET | /usr/bin/tail -c 4)
|
RET_STATUS=$(echo $RET | /usr/bin/tail -c 4)
|
||||||
if [ "$RET_STATUS" -ne "200" ]; then
|
if [ "$RET_STATUS" -ne "200" ]; then
|
||||||
echo "$0: Error: HTTP response status code is '$RET_STATUS'"
|
echo "$0: Error: HTTP response status code is '$RET_STATUS'"
|
||||||
|
|||||||
Reference in New Issue
Block a user