@@ -26,7 +26,7 @@ if [ -z "$JQ" ]; then
26
26
fi
27
27
28
28
if [ " $# " -lt 1 -o " ${1: 0: 1} " != " /" ]; then
29
- /bin/ cat >&2 << EOF
29
+ cat >&2 << EOF
30
30
USAGE: $0 /<path> [curl args...]
31
31
32
32
Runs 'curl' against https://stenographerserver/path, returning data on STDOUT.
@@ -39,13 +39,13 @@ the results through tcpdump for easier handling.
39
39
EOF
40
40
exit 1
41
41
fi
42
- PATH =" $1 " # starts with '/'
42
+ URLPATH =" $1 " # starts with '/'
43
43
shift
44
44
45
45
STENOGRAPHER_CONFIG=" ${STENOGRAPHER_CONFIG-/ etc/ stenographer/ config} "
46
46
47
47
if [ ! -r " $STENOGRAPHER_CONFIG " ]; then
48
- /bin/ cat >&2 << EOF
48
+ cat >&2 << EOF
49
49
Unable to access stenographer config at '$STENOGRAPHER_CONFIG '. You may need
50
50
to set the STENOGRAPHER_CONFIG environmental variable to point to the correct
51
51
location 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
60
60
echo " Unable to get port ($PORT ) or certpath ($CERTPATH ) from config ($STENOGRAPHER_CONFIG )" >&2
61
61
exit 1
62
62
fi
63
- URL=" https://$HOST :$PORT$PATH " # PATH already starts with /
63
+ URL=" https://$HOST :$PORT$URLPATH " # URLPATH already starts with /
64
64
65
- if ! /bin/ cat " $CERTPATH /client_key.pem" > /dev/null; then
65
+ if ! cat " $CERTPATH /client_key.pem" > /dev/null; then
66
66
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
68
68
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
71
71
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
73
73
exit 1
74
74
fi
75
75
76
- /usr/bin/ curl \
76
+ curl \
77
77
--cert " $CERTPATH /client_cert.pem" \
78
78
--key " $CERTPATH /client_key.pem" \
79
79
--cacert " $CERTPATH /ca_cert.pem" \
0 commit comments