diff --git a/storage.sh b/storage.sh index 6cbe188..907c701 100644 --- a/storage.sh +++ b/storage.sh @@ -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}