updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / adsuck / adsuck.install
blob05a135bb9a2e3f12efd9d1b323e00b51275f7644
1 post_install() {
2   if [ ! `egrep '^_adsuck:' /etc/group` ]; then
3     echo "Adding adsuck group"
4     groupadd _adsuck
5   fi
7   if [ ! `egrep '^_adsuck:' /etc/passwd` ]; then
8     echo "Adding adsuck user"
9     useradd -g _adsuck -d /var/adsuck -s /bin/false _adsuck
10   fi
11   echo 'Now manipulate the regex file /var/adsuck/filter and get your /var/adsuck/hosts file'
12   echo 'Examples: http://www.mvps.org/winhelp2002/hosts.txt'
13   echo '          http://rlwpx.free.fr/WPFF/hosts.htm'
14   echo '          http://pgl.yoyo.org/adservers/serverlist.php?showintro=0;hostformat=hosts'
15   echo 'And make sure your setup with resolv.conf is correct.'
18 post_upgrade() {
19   post_install $1
22 pre_remove() {
23   echo "Removing adsuck user and group"
24   groupdel _adsuck &> /dev/null
25   userdel _adsuck &> /dev/null
28 op=$1
29 shift
31 $op $*