Delete 'webhook.cgi'

master
murtaugh 5 years ago
parent 339bf30b64
commit a88ab71240

@ -1,32 +0,0 @@
#!/bin/bash
echo "Content-type: text/html"
echo
if [ "$REQUEST_METHOD" = "POST" ]; then
if [ "$CONTENT_TYPE" = "application/json" ]; then
SECRET=$(jq -r ".secret")
if [ $SECRET = "SECRET" ]; then
cd /var/www/html/12
git pull
make
# cat > /usr/lib/cgi-bin/webhook.json
# read -n "$CONTENT_LENGTH" QUERY_STRING_POST
else
echo BAD SECRET
fi
else
echo NOT JSON
fi
else
echo NOT POST
fi
echo "done"
# Example: Using backslashes to do multiline...
# src: https://riptutorial.com/bash/example/29665/request-method--post--w-json
# echo "<hr>Script Error:"\
# "<br>Usage error, cannot complete request, REQUEST_METHOD!=GET."\
# "<br>Check your FORM declaration and be sure to use METHOD=\"GET\".<hr>"
# exit 1
Loading…
Cancel
Save