Alternative command example.

This commit is contained in:
Fabian Märki
2017-03-02 09:00:53 +01:00
parent 900cd93e69
commit 31fc5c11cc

View File

@@ -1,4 +1,3 @@
#!/bin/bash
HOST="https://dispatcher-api.psi.ch/sf"
@@ -12,8 +11,6 @@ while read -r -d '' filename; do
COMMAND+=" -F files=@${filename}"
done < <(find . \( -name "*rf*.sources" \) -print0)
# COMMAND="curl -H \"Content-Type: application/json\" -d '{\"sources\": [{\"stream\": \"tcp://SINEG01-CVME-LLRF1:20000\"},{\"stream\": \"tcp://SINEG01-CVME-LLRF2:20000\"}]}'"
COMMAND+=" ${HOST}${HTTP_ADDRESS} -o ${RESPONSE}"
echo "Execute command: "${COMMAND}
@@ -21,5 +18,8 @@ STATUS=$(${COMMAND})
cat ${RESPONSE} | python -m json.tool
rm -f ${RESPONSE}
#echo ${STATUS}
COMMAND2="curl -H \"Content-Type: application/json\" -d '{\"sources\": [{\"stream\": \"tcp://SINEG01-CVME-LLRF1:20000\"},{\"stream\": \"tcp://SINEG01-CVME-LLRF2:20000\"}]}' ${HOST}${HTTP_ADDRESS} | python -m js$
echo "Alternative command: "${COMMAND2}
#echo ${STATUS}