White space formatting fixes
Closes: <https://github.com/nginx/unit/pull/1062>
This commit is contained in:
@@ -77,9 +77,9 @@ SYNOPSIS
|
|||||||
Subcommands
|
Subcommands
|
||||||
├── cmd [-h]
|
├── cmd [-h]
|
||||||
├── ctl [-h] [-s SOCK] SUBCOMMAND [ARGS]
|
├── ctl [-h] [-s SOCK] SUBCOMMAND [ARGS]
|
||||||
│ ├── edit [-h] PATH
|
│ ├── edit [-h] PATH
|
||||||
│ ├── http [-h] [-c CURLOPT] METHOD PATH
|
│ ├── http [-h] [-c CURLOPT] METHOD PATH
|
||||||
│ └── insert [-h] PATH INDEX
|
│ └── insert [-h] PATH INDEX
|
||||||
├── freeport [-h]
|
├── freeport [-h]
|
||||||
├── json-ins [-hn] JSON INDEX
|
├── json-ins [-hn] JSON INDEX
|
||||||
├── os-probe [-h]
|
├── os-probe [-h]
|
||||||
@@ -87,8 +87,8 @@ SYNOPSIS
|
|||||||
├── repo-config [-hn] [PKG-MANAGER OS-NAME OS-VERSION]
|
├── repo-config [-hn] [PKG-MANAGER OS-NAME OS-VERSION]
|
||||||
├── restart [-hls]
|
├── restart [-hls]
|
||||||
├── sock [-h] SUBCOMMAND [ARGS]
|
├── sock [-h] SUBCOMMAND [ARGS]
|
||||||
│ ├── filter [-chs]
|
│ ├── filter [-chs]
|
||||||
│ └── find [-h]
|
│ └── find [-h]
|
||||||
└── welcome [-hn]
|
└── welcome [-hn]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# unitc - a curl wrapper for configuring NGINX Unit
|
# unitc - a curl wrapper for configuring NGINX Unit
|
||||||
# https://github.com/nginx/unit/tree/master/tools
|
# https://github.com/nginx/unit/tree/master/tools
|
||||||
# NGINX, Inc. (c) 2023
|
# NGINX, Inc. (c) 2023
|
||||||
|
|
||||||
# Defaults
|
# Defaults
|
||||||
@@ -292,7 +292,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
NEW_ELEMENT=$(cat ${CONF_FILES[@]})
|
NEW_ELEMENT=$(cat ${CONF_FILES[@]})
|
||||||
echo $NEW_ELEMENT | jq > /dev/null || exit $? # Test the input is valid JSON before proceeding
|
echo $NEW_ELEMENT | jq > /dev/null || exit $? # Test the input is valid JSON before proceeding
|
||||||
OLD_ARRAY=$($RPC_CMD curl -s $UNIT_CTRL$URI)
|
OLD_ARRAY=$($RPC_CMD curl -s $UNIT_CTRL$URI)
|
||||||
if [ "$(echo $OLD_ARRAY | jq -r type)" = "array" ]; then
|
if [ "$(echo $OLD_ARRAY | jq -r type)" = "array" ]; then
|
||||||
echo $OLD_ARRAY | jq ". |= [$NEW_ELEMENT] + ." | $RPC_CMD curl -X PUT --data-binary @- $UNIT_CTRL$URI 2> /tmp/${0##*/}.$$ | $OUTPUT
|
echo $OLD_ARRAY | jq ". |= [$NEW_ELEMENT] + ." | $RPC_CMD curl -X PUT --data-binary @- $UNIT_CTRL$URI 2> /tmp/${0##*/}.$$ | $OUTPUT
|
||||||
|
|||||||
Reference in New Issue
Block a user