cosmetic fix in journal logging (log basename only)
This commit is contained in:
@@ -10,7 +10,7 @@ curl -s -X POST https://api.schwabapi.com/v1/oauth/token \
|
|||||||
jq -e -r .access_token temp/accessTokenReqResp.$$.json > access_token.dat
|
jq -e -r .access_token temp/accessTokenReqResp.$$.json > access_token.dat
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
errMsg="ERROR: GETTING THE ACCESS TOKEN FAILED! $(<temp/accessTokenReqResp.$$.json)"
|
errMsg="ERROR: GETTING THE ACCESS TOKEN FAILED! $(<temp/accessTokenReqResp.$$.json)"
|
||||||
systemd-cat -t "$0" -p err <<< ${errMsg}
|
systemd-cat -t "`basename $0`" -p err <<< ${errMsg}
|
||||||
>&2 echo "${errMsg}"
|
>&2 echo "${errMsg}"
|
||||||
curl -d "" -X POST "https://deadswitch.kawomi.com/api/v1?topic=trade.schwab.error.getNewAccessToken&secs=1&email=joe@kawomi.com"
|
curl -d "" -X POST "https://deadswitch.kawomi.com/api/v1?topic=trade.schwab.error.getNewAccessToken&secs=1&email=joe@kawomi.com"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
systemd-cat -t "$0" -p info <<< "Started"
|
systemd-cat -t "`basename $0`" -p info <<< "Started"
|
||||||
|
|
||||||
./getNewAccessToken.sh
|
./getNewAccessToken.sh
|
||||||
|
|
||||||
@@ -32,4 +32,4 @@ if [[ -e temp/hadErrors.$$.tmp ]]; then
|
|||||||
curl -d "" -X POST "https://deadswitch.kawomi.com/api/v1?topic=trade.schwab.error.recordAllSymbolsSingleRun&secs=1&email=joe@kawomi.com"
|
curl -d "" -X POST "https://deadswitch.kawomi.com/api/v1?topic=trade.schwab.error.recordAllSymbolsSingleRun&secs=1&email=joe@kawomi.com"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
systemd-cat -t "$0" -p info <<< "Finished"
|
systemd-cat -t "`basename $0`" -p info <<< "Finished"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ jqQuery=".symbol"
|
|||||||
symbolCheck=$(jq -r ${jqQuery} < temp/optionChain.${symbol}.tmp.$$.json)
|
symbolCheck=$(jq -r ${jqQuery} < temp/optionChain.${symbol}.tmp.$$.json)
|
||||||
if [[ "${symbol}" != "${symbolCheck}" ]]; then
|
if [[ "${symbol}" != "${symbolCheck}" ]]; then
|
||||||
errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/optionChain.${symbol}.tmp.$$.json_"
|
errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/optionChain.${symbol}.tmp.$$.json_"
|
||||||
systemd-cat -t "$0 $1" -p err <<< ${errMsg}
|
systemd-cat -t "`basename $0` $1" -p err <<< ${errMsg}
|
||||||
>&2 echo "${errMsg}"
|
>&2 echo "${errMsg}"
|
||||||
exit 2
|
exit 2
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ for range in ITM OTM NTM; do
|
|||||||
symbolCheck=$(jq -r ${jqQuery} < temp/optionChain.${symbol}.${range}.tmp.$$.json)
|
symbolCheck=$(jq -r ${jqQuery} < temp/optionChain.${symbol}.${range}.tmp.$$.json)
|
||||||
if [[ "${symbol}" != "${symbolCheck}" ]]; then
|
if [[ "${symbol}" != "${symbolCheck}" ]]; then
|
||||||
errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/optionChain.${symbol}.${range}.tmp.$$.json_"
|
errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/optionChain.${symbol}.${range}.tmp.$$.json_"
|
||||||
systemd-cat -t "$0 $1" -p err <<< ${errMsg}
|
systemd-cat -t "`basename $0` $1" -p err <<< ${errMsg}
|
||||||
>&2 echo "${errMsg}"
|
>&2 echo "${errMsg}"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ jqQuery=".\"${symbol}\".symbol"
|
|||||||
symbolCheck=$(jq -r ${jqQuery} < temp/quote.${symbol}.tmp.$$.json)
|
symbolCheck=$(jq -r ${jqQuery} < temp/quote.${symbol}.tmp.$$.json)
|
||||||
if [[ "${symbol}" != "${symbolCheck}" ]]; then
|
if [[ "${symbol}" != "${symbolCheck}" ]]; then
|
||||||
errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/quote.${symbol}.tmp.$$.json_"
|
errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/quote.${symbol}.tmp.$$.json_"
|
||||||
systemd-cat -t "$0 $1" -p err <<< ${errMsg}
|
systemd-cat -t "`basename $0` $1" -p err <<< ${errMsg}
|
||||||
>&2 echo "${errMsg}"
|
>&2 echo "${errMsg}"
|
||||||
exit 2
|
exit 2
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user