annotate install.bash @ 22:c21b888cc175 stable-2-2

fix restart code, add ifdef for linux pid issues
author carl
date Sat, 01 May 2004 07:44:51 -0700
parents 443aa0e8c6fa
children 06de5ab6a232
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96a9758165cd Initial revision
carl
parents:
diff changeset
1 #!/bin/bash
96a9758165cd Initial revision
carl
parents:
diff changeset
2
96a9758165cd Initial revision
carl
parents:
diff changeset
3 #####################
96a9758165cd Initial revision
carl
parents:
diff changeset
4 # stop the milter if it is already installed
96a9758165cd Initial revision
carl
parents:
diff changeset
5 if [ -f /etc/rc.d/init.d/dnsbl ]; then
96a9758165cd Initial revision
carl
parents:
diff changeset
6 /etc/rc.d/init.d/dnsbl stop
96a9758165cd Initial revision
carl
parents:
diff changeset
7 rm -f /etc/rc.d/init.d/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
8 fi
96a9758165cd Initial revision
carl
parents:
diff changeset
9
96a9758165cd Initial revision
carl
parents:
diff changeset
10
96a9758165cd Initial revision
carl
parents:
diff changeset
11 #####################
96a9758165cd Initial revision
carl
parents:
diff changeset
12 # build the milter
14
443aa0e8c6fa changes suggested by Nigel Horne
carl
parents: 8
diff changeset
13 # add compiler flags - suggested by Nigel Horne
443aa0e8c6fa changes suggested by Nigel Horne
carl
parents: 8
diff changeset
14 g++ -c $CXXFLAGS dnsbl.cpp
8
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
15 if [ $? -ne 0 ]; then
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
16 echo "compiler errors"
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
17 exit
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
18 fi
0
96a9758165cd Initial revision
carl
parents:
diff changeset
19 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread
8
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
20 if [ $? -ne 0 ]; then
dbe18921f741 integration work on url scanner
carl
parents: 5
diff changeset
21 echo "linker errors"
0
96a9758165cd Initial revision
carl
parents:
diff changeset
22 exit
96a9758165cd Initial revision
carl
parents:
diff changeset
23 fi
96a9758165cd Initial revision
carl
parents:
diff changeset
24
96a9758165cd Initial revision
carl
parents:
diff changeset
25
96a9758165cd Initial revision
carl
parents:
diff changeset
26 #####################
96a9758165cd Initial revision
carl
parents:
diff changeset
27 # install the milter
96a9758165cd Initial revision
carl
parents:
diff changeset
28 DST=/var/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
29 mkdir -p $DST
14
443aa0e8c6fa changes suggested by Nigel Horne
carl
parents: 8
diff changeset
30 if [ ! -f $DST/dnsbl.conf ]; then
443aa0e8c6fa changes suggested by Nigel Horne
carl
parents: 8
diff changeset
31 cp dnsbl.conf $DST
443aa0e8c6fa changes suggested by Nigel Horne
carl
parents: 8
diff changeset
32 fi
5
793ac9cc114d updates to use dcc conf files
carl
parents: 0
diff changeset
33 mv -f dnsbl $DST
0
96a9758165cd Initial revision
carl
parents:
diff changeset
34 cp dnsbl.rc /etc/rc.d/init.d/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
35 chmod 755 /etc/rc.d/init.d/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
36 /sbin/chkconfig --add dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
37 /sbin/chkconfig --level 2345 dnsbl on
96a9758165cd Initial revision
carl
parents:
diff changeset
38 /etc/rc.d/init.d/dnsbl start