---
name: adsuck
version: 2.3_1
origin: dns/adsuck
comment: DNS relay for ad blocking
arch: freebsd:9:x86:64
www: http://opensource.conformal.com/wiki/Adsuck
maintainer: phil@philpep.org
prefix: /usr/local
licenselogic: single
licenses: [BSD]
flatsize: 11949928
desc: |
  adsuck is a DNS relay that returns NXdomain for hosts that match names in a
  blacklist for quick and non browser plugin based ad blocking.

  WWW: http://opensource.conformal.com/wiki/Adsuck
deps:
  ldns: {origin: dns/ldns, version: 1.6.16}
  libevent: {origin: devel/libevent, version: 1.4.14b_2}
categories: [dns]
users: [_adsuck]
groups: [_adsuck]
files:
  /usr/local/etc/rc.d/adsuck: ff686d74eea3a5a8aa443e2b60ba70af0933d1d6eccdbc2293aa0d19098d1c57
  /usr/local/man/man8/adsuck.8.gz: 7172882e56a5b39460ee80bc524a77c0a6ff28fd75547d1693a622d030a31e21
  /usr/local/sbin/adsuck: e432c6b50ca252973e0af167af545a2d38d19d6117078aa33db500386782af3c
  /usr/local/share/examples/adsuck/Hosts.blc: e0f60055bb20c52b576c7cb4e65ad9a72b5a77be0634d7b71d473d29d5b0e48e
  /usr/local/share/examples/adsuck/Hosts.pub: 450578399ce5594b6d23597ea2676a145ee684f976057ead1ad9ca383a791d42
  /usr/local/share/examples/adsuck/Hosts.rsk: 71e7989be638d75bcd60ea1c12a9c461e2296ede74e0c4d118a13aef01cdd9f0
  /usr/local/share/examples/adsuck/Hosts.trc: 979971dd3ed56e3a1faf0c26de093ac4522dedeb403a7f6ef1be1f9a60afa532
  /usr/local/share/examples/adsuck/README: 58991f7c3a86831869fcd2e38d71e670f9a58b972e06b248cd34283868cedc96
  /usr/local/share/examples/adsuck/hosts.small: 875646be57ec8f3a8782d75e8a068e6ff84fe38a12da48fe97bea1f0d33cf985
  /usr/local/share/examples/adsuck/hosts.yoyo: 1babc3b89a6850a41c2570f8b04d30c251e254b19385905fea3b52d7f47d9344
  /usr/local/share/examples/adsuck/regex: efb3d042a52b6ea9521e032c2e5ba345c57983348abc2793210ca6b48b6bc524
  /usr/local/share/examples/adsuck/resolv.conf: b015772310392b7bd9127d8ea899e133a456346d6812dd2b7c77bec1d443cd68
  /usr/local/share/licenses/adsuck-2.3_1/BSD: 85e7a53b5e2d3e350e2d084fed2f94b7f63005f8e1168740e1e84aa9fa5d48ce
  /usr/local/share/licenses/adsuck-2.3_1/LICENSE: d9cce0db43502eb1bd8fbef7e960cfaa43b5647186f7f7379923b336209fd77b
  /usr/local/share/licenses/adsuck-2.3_1/catalog.mk: e0dc7bf146f5ccb391fc6778e53f9cd4fe772b1028e5e82ba4aac5958bebfbf3
directories:
  /usr/local/share/licenses/adsuck-2.3_1/: n
  /usr/local/share/licenses/: y
  /usr/local/share/examples/adsuck/: n
scripts:
  post-install: |
    echo "===> Creating users and/or groups."
    if ! /usr/sbin/pw groupshow _adsuck >/dev/null 2>&1; then  echo "Creating group '_adsuck' with gid '253'.";  /usr/sbin/pw groupadd _adsuck -g 253; else echo "Using existing group '_adsuck'."; fi
    if ! /usr/sbin/pw usershow _adsuck >/dev/null 2>&1; then  echo "Creating user '_adsuck' with uid '253'.";  /usr/sbin/pw useradd _adsuck -u 253 -g 253  -c "Adsuck ad blocking user" -d /nonexistent -s /usr/sbin/nologin;  else echo "Using existing user '_adsuck'."; fi
    cd /usr/local
    cd /usr/local
  pre-deinstall: |
    if /usr/sbin/pw usershow _adsuck >/dev/null 2>&1; then  echo "==> You should manually remove the \"_adsuck\" user. "; fi
    cd /usr/local
    cd /usr/local
  post-deinstall: |
    cd /usr/local
    cd /usr/local
  deinstall: "#!/bin/sh\n\nif [ \"$2\" != \"POST-DEINSTALL\" ]; then\n\texit 0\nfi\n\nif
    pw groupshow _adsuck 2>/dev/null 1>&2; then\n\techo \"To delete the '_adsuck'
    group permanently, use 'pw groupdel _adsuck'\"\nfi\n\nif pw usershow _adsuck 2>/dev/null
    1>&2; then\n\techo \"To delete the '_adsuck' user permanently, use 'pw userdel
    _adsuck'\"\nfi\n\nexit 0\n"
message: |2+


  Quick way to use adsuck chrooted in /var/adsuck

  mkdir /var/adsuck
  cp /usr/local/share/examples/adsuck/* /var/adsuck

  # Adsuck forward to your old dns server
  cp /etc/resolv.conf /var/adsuck

  # Enable and start adsuck
  echo adsuck_enable=\"YES\" >> /etc/rc.conf
  /usr/local/etc/rc.d/adsuck start

  # Use adsuck as dns server
  echo "nameserver 127.0.0.1" > /etc/resolv.conf

  If you're using DHCP consider configuring your dhclient.conf(5) to prevent
  resolv.conf updates.


