Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 1 | #!/bin/bash |
2 | |||||
3 | while read QUERY; do | ||||
4 | QUERY=($QUERY) | ||||
5 | if [ "${QUERY[0]}" != "get" ]; then | ||||
6 | echo "500 dunno" | ||||
7 | continue | ||||
8 | fi | ||||
9 | result=$(curl -s http://nginx:8081/forwardinghosts.php?host=${QUERY[1]}) | ||||
10 | logger -t whitelist_forwardinghosts -p mail.info "Look up ${QUERY[1]} on whitelist, result $result" | ||||
11 | echo ${result} | ||||
12 | done |