verify-peer.sh 218 B

123456789101112
  1. #!/bin/bash
  2. timestamp() {
  3. date +"%Y-%m-%d %H:%M:%S"
  4. }
  5. if [ -n "$(cat /etc/fastd/peers-blacklist | grep "$1")" ]; then
  6. echo -e "$(timestamp)\t$1\t$2\tblocked" >> /var/log/fastd.blacklist;
  7. exit 1;
  8. else
  9. exit 0;
  10. fi