Mercurial > dnsbl
annotate install.bash @ 67:a39c813e8f7b
add uuencode decoding
author | carl |
---|---|
date | Sat, 22 Jan 2005 18:07:09 -0800 |
parents | 419e00901570 |
children | 81f1e400e8ab |
rev | line source |
---|---|
0 | 1 #!/bin/bash |
2 | |
3 ##################### | |
4 # stop the milter if it is already installed | |
5 if [ -f /etc/rc.d/init.d/dnsbl ]; then | |
6 /etc/rc.d/init.d/dnsbl stop | |
7 rm -f /etc/rc.d/init.d/dnsbl | |
8 fi | |
9 | |
10 | |
11 ##################### | |
12 # build the milter | |
14 | 13 # add compiler flags - suggested by Nigel Horne |
37
ccf2c2651c1d
add -pthread compiler option, fix error in scanning for end of html comment
carl
parents:
28
diff
changeset
|
14 g++ -c $CXXFLAGS -pthread dnsbl.cpp |
8 | 15 if [ $? -ne 0 ]; then |
16 echo "compiler errors" | |
17 exit | |
18 fi | |
0 | 19 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread |
8 | 20 if [ $? -ne 0 ]; then |
21 echo "linker errors" | |
0 | 22 exit |
23 fi | |
24 | |
25 | |
26 ##################### | |
41
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
37
diff
changeset
|
27 # ensure the user is created |
42 | 28 /usr/bin/getent passwd dnsbl || /usr/sbin/useradd -r -d /etc/dnsbl -M -c "dnsbl pseudo-user" -s /sbin/nologin dnsbl |
0 | 29 # install the milter |
41
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
37
diff
changeset
|
30 DST=/etc/dnsbl |
0 | 31 mkdir -p $DST |
41
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
37
diff
changeset
|
32 if [ -f /var/dnsbl/dnsbl.conf ]; then |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
37
diff
changeset
|
33 # move the conf files to the new location |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
37
diff
changeset
|
34 mv /var/dnsbl/*conf $DST |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
37
diff
changeset
|
35 rm /var/dnsbl/dnsbl # remove the old binary |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
37
diff
changeset
|
36 rmdir /var/dnsbl |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
37
diff
changeset
|
37 fi |
14 | 38 if [ ! -f $DST/dnsbl.conf ]; then |
39 cp dnsbl.conf $DST | |
40 fi | |
57 | 41 if [ ! -f $DST/hosts-ignore.conf ]; then |
42 cp hosts-ignore.conf $DST | |
43 fi | |
24 | 44 if [ ! -f $DST/html-tags.conf ]; then |
45 cp html-tags.conf $DST | |
46 fi | |
28 | 47 if [ ! -f $DST/tld.conf ]; then |
48 cp tld.conf $DST | |
49 fi | |
46 | 50 |
51 # make the directory for the socket | |
52 mkdir -p /var/run/dnsbl | |
53 chown dnsbl:dnsbl /var/run/dnsbl | |
54 chmod 700 /var/run/dnsbl | |
55 | |
56 # install the binaries | |
41
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
37
diff
changeset
|
57 mv -f dnsbl /usr/sbin/dnsbl |
0 | 58 cp dnsbl.rc /etc/rc.d/init.d/dnsbl |
59 chmod 755 /etc/rc.d/init.d/dnsbl | |
60 /sbin/chkconfig --add dnsbl | |
61 /sbin/chkconfig --level 2345 dnsbl on | |
62 /etc/rc.d/init.d/dnsbl start |