@@ -26,7 +26,7 @@ if [ -z "$JQ" ]; then
2626fi
2727
2828if [ " $# " -lt 1 -o " ${1: 0: 1} " != " /" ]; then
29- /bin/ cat >&2 << EOF
29+ cat >&2 << EOF
3030USAGE: $0 /<path> [curl args...]
3131
3232Runs 'curl' against https://stenographerserver/path, returning data on STDOUT.
@@ -39,13 +39,13 @@ the results through tcpdump for easier handling.
3939EOF
4040 exit 1
4141fi
42- PATH =" $1 " # starts with '/'
42+ URLPATH =" $1 " # starts with '/'
4343shift
4444
4545STENOGRAPHER_CONFIG=" ${STENOGRAPHER_CONFIG-/ etc/ stenographer/ config} "
4646
4747if [ ! -r " $STENOGRAPHER_CONFIG " ]; then
48- /bin/ cat >&2 << EOF
48+ cat >&2 << EOF
4949Unable to access stenographer config at '$STENOGRAPHER_CONFIG '. You may need
5050to set the STENOGRAPHER_CONFIG environmental variable to point to the correct
5151location of your config, or you may need to request read access to that file.
@@ -60,20 +60,20 @@ if [ -z "$PORT" -o -z "$CERTPATH" ]; then
6060 echo " Unable to get port ($PORT ) or certpath ($CERTPATH ) from config ($STENOGRAPHER_CONFIG )" >&2
6161 exit 1
6262fi
63- URL=" https://$HOST :$PORT$PATH " # PATH already starts with /
63+ URL=" https://$HOST :$PORT$URLPATH " # URLPATH already starts with /
6464
65- if ! /bin/ cat " $CERTPATH /client_key.pem" > /dev/null; then
65+ if ! cat " $CERTPATH /client_key.pem" > /dev/null; then
6666 echo " You do not have permission to access Stenographer data" >&2
67- /bin/ ls -l " $CERTPATH /client_key.pem" >&2
67+ ls -l " $CERTPATH /client_key.pem" >&2
6868 while [ " $CERTPATH " != " /" ]; do
69- CERTPATH=" $( /usr/bin/ dirname " $CERTPATH " ) "
70- /bin/ ls -l -d " $CERTPATH " >&2
69+ CERTPATH=" $( dirname " $CERTPATH " ) "
70+ ls -l -d " $CERTPATH " >&2
7171 done
72- echo -e " Your permissions: user=$( /usr/bin/ id -n -u) groups=$( /usr/bin/ groups) " >&2
72+ echo -e " Your permissions: user=$( id -n -u) groups=$( groups) " >&2
7373 exit 1
7474fi
7575
76- /usr/bin/ curl \
76+ curl \
7777 --cert " $CERTPATH /client_cert.pem" \
7878 --key " $CERTPATH /client_key.pem" \
7979 --cacert " $CERTPATH /ca_cert.pem" \
0 commit comments