Getting invalid payload when trying to cURL slack
问题 I am trying to cURL slack when nginx fails to reload. I am able to check that nginx failed and can cURL slack when it does. I am running into an invalid payload error when trying to include the error message from the failed reload within my cURL command. This is the script I have to do that: #!/bin/bash OUTPUT=$(nginx -s reload 2>&1 > /dev/null >/mnt/efs/out.txt) ESCAPE=$(echo $OUTPUT | sed 's/"/\"/g' | sed "s/'/\'/g" ) nginx -t || curl -X POST --data-urlencode 'payload={"username": "reload