blob: 3b568074a9609da92ddf087c5aaddd49c427b934 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
--- autoconf/fbsd.in-orig Mon Oct 21 15:01:20 2002
+++ autoconf/fbsd.in Mon Oct 21 15:04:42 2002
@@ -19,7 +19,7 @@
bannedphraselist exceptionphraselist
PASSVARS = -DPROXYUSER=\"${PROXYUSER}\"
-PASSVARS += -DLOGLOCATION=\"${LOGLOCATION}access.log\"
+PASSVARS += -DLOGLOCATION=\"${LOGLOCATION}dansguardian.log\"
PASSVARS += -DCONFFILELOCATION=\"${CONFFILELOCATION}dansguardian.conf\"
PASSVARS += -DPIDDIR=\"${PIDDIR}\"
@@ -36,44 +36,74 @@
.cpp.o:
$(CPP) $(DEBUG) $(CFLAGS) -c $<
-all: $(OBJ)
+all: $(OBJ)
$(CPP) -o dansguardian $(DGCFLAGS) $(DEBUG) $(OBJ) $(LIBS) dansguardian.cpp
install:
@test -d $I$(SYSVLOCATION) || install -d $I$(SYSVLOCATION)
@test -d $I$(CONFFILELOCATION) || install -d $I$(CONFFILELOCATION)
@test -d $I$(CONFFILELOCATION)phraselists || install -d $I$(CONFFILELOCATION)phraselists
+ @test -d $I$(CONFFILELOCATION)phraselists/chat || install -d $I$(CONFFILELOCATION)phraselists/chat
+ @test -d $I$(CONFFILELOCATION)phraselists/drugadvocasy || install -d $I$(CONFFILELOCATION)phraselists/drugadvocasy
+ @test -d $I$(CONFFILELOCATION)phraselists/dutchbadwords || install -d $I$(CONFFILELOCATION)phraselists/dutchbadwords
+ @test -d $I$(CONFFILELOCATION)phraselists/frenchbadwords || install -d $I$(CONFFILELOCATION)phraselists/frenchbadwords
+ @test -d $I$(CONFFILELOCATION)phraselists/gambling || install -d $I$(CONFFILELOCATION)phraselists/gambling
+ @test -d $I$(CONFFILELOCATION)phraselists/goodphrases || install -d $I$(CONFFILELOCATION)phraselists/goodphrases
+ @test -d $I$(CONFFILELOCATION)phraselists/gore || install -d $I$(CONFFILELOCATION)phraselists/gore
+ @test -d $I$(CONFFILELOCATION)phraselists/illegaldrugs || install -d $I$(CONFFILELOCATION)phraselists/illegaldrugs
+ @test -d $I$(CONFFILELOCATION)phraselists/intolerance || install -d $I$(CONFFILELOCATION)phraselists/intolerance
+ @test -d $I$(CONFFILELOCATION)phraselists/legaldrugs || install -d $I$(CONFFILELOCATION)phraselists/legaldrugs
+ @test -d $I$(CONFFILELOCATION)phraselists/personals || install -d $I$(CONFFILELOCATION)phraselists/personals
+ @test -d $I$(CONFFILELOCATION)phraselists/pornography || install -d $I$(CONFFILELOCATION)phraselists/pornography
+ @test -d $I$(CONFFILELOCATION)phraselists/violence || install -d $I$(CONFFILELOCATION)phraselists/violence/
+ @test -d $I$(CONFFILELOCATION)phraselists/warezhacking || install -d $I$(CONFFILELOCATION)phraselists/warezhacking
+ @test -d $I$(CONFFILELOCATION)phraselists/weapons || install -d $I$(CONFFILELOCATION)phraselists/weapons
@test -d $I$(CGIBINLOCATION) || install -d $I$(CGIBINLOCATION)
@test -d $I$(MANUALFILES)man8/ || install -d $I$(MANUALFILES)man8/
- @test -d $I$(LOGLOCATION) || install -d $I$(LOGLOCATION)
- @test -d $I$(BINARYLOCATION) || /usr/sbin/install -d $I$(BINARYLOCATION)
- cp -f ./dansguardian $I$(BINARYLOCATION)dansguardian
- cp -f ./dansguardian.conf $I$(CONFFILELOCATION)dansguardian.conf
- cp -f ./bannedphraselist $I$(CONFFILELOCATION)bannedphraselist
- cp -f ./exceptionphraselist $I$(CONFFILELOCATION)exceptionphraselist
- cp -f ./weightedphraselist $I$(CONFFILELOCATION)weightedphraselist
- cp -f -R ./phraselists/* $I$(CONFFILELOCATION)phraselists/
- cp -f ./bannediplist $I$(CONFFILELOCATION)bannediplist
- cp -f ./banneduserlist $I$(CONFFILELOCATION)banneduserlist
- cp -f ./bannedextensionlist $I$(CONFFILELOCATION)bannedextensionlist
- cp -f ./bannedmimetypelist $I$(CONFFILELOCATION)bannedmimetypelist
- cp -f ./bannedurllist $I$(CONFFILELOCATION)bannedurllist
- cp -f ./bannedregexpurllist $I$(CONFFILELOCATION)bannedregexpurllist
- cp -f ./bannedsitelist $I$(CONFFILELOCATION)bannedsitelist
- cp -f ./exceptionsitelist $I$(CONFFILELOCATION)exceptionsitelist
- cp -f ./exceptionurllist $I$(CONFFILELOCATION)exceptionurllist
- cp -f ./exceptionuserlist $I$(CONFFILELOCATION)exceptionuserlist
- cp -f ./exceptioniplist $I$(CONFFILELOCATION)exceptioniplist
- cp -f ./pics $I$(CONFFILELOCATION)pics
- cp -f ./template.html $I$(CONFFILELOCATION)template.html
- cp -f ./logrotation $I$(CONFFILELOCATION)logrotation
- cp -f ./dansguardian.bsdv $I$(SYSVLOCATION)dansguardian.sh
- cp -f ./dansguardian.pl $I$(CGIBINLOCATION)dansguardian.pl
+ install -o root -g wheel -m 755 ./dansguardian $I$(BINARYLOCATION)dansguardian
+ install -o root -g wheel -m 644 ./dansguardian.conf $I$(CONFFILELOCATION)dansguardian.conf
+ install -o root -g wheel -m 644 ./bannedphraselist $I$(CONFFILELOCATION)bannedphraselist
+ install -o root -g wheel -m 644 ./exceptionphraselist $I$(CONFFILELOCATION)exceptionphraselist
+ install -o root -g wheel -m 644 ./weightedphraselist $I$(CONFFILELOCATION)weightedphraselist
+ install -o root -g wheel -m 644 ./phraselists/chat/weighted $I$(CONFFILELOCATION)phraselists/chat/weighted
+ install -o root -g wheel -m 644 ./phraselists/drugadvocasy/weighted $I$(CONFFILELOCATION)phraselists/drugadvocasy/weighted
+ install -o root -g wheel -m 644 ./phraselists/dutchbadwords/weighted $I$(CONFFILELOCATION)phraselists/dutchbadwords/weighted
+ install -o root -g wheel -m 644 ./phraselists/frenchbadwords/weighted $I$(CONFFILELOCATION)phraselists/frenchbadwords/weighted
+ install -o root -g wheel -m 644 ./phraselists/gambling/banned $I$(CONFFILELOCATION)phraselists/gambling/banned
+ install -o root -g wheel -m 644 ./phraselists/gambling/weighted $I$(CONFFILELOCATION)phraselists/gambling/weighted
+ install -o root -g wheel -m 644 ./phraselists/goodphrases/exception $I$(CONFFILELOCATION)phraselists/goodphrases/exception
+ install -o root -g wheel -m 644 ./phraselists/goodphrases/weighted $I$(CONFFILELOCATION)phraselists/goodphrases/weighted
+ install -o root -g wheel -m 644 ./phraselists/gore/weighted $I$(CONFFILELOCATION)phraselists/gore/weighted
+ install -o root -g wheel -m 644 ./phraselists/illegaldrugs/banned $I$(CONFFILELOCATION)phraselists/illegaldrugs/banned
+ install -o root -g wheel -m 644 ./phraselists/illegaldrugs/weighted $I$(CONFFILELOCATION)phraselists/illegaldrugs/weighted
+ install -o root -g wheel -m 644 ./phraselists/intolerance/banned $I$(CONFFILELOCATION)phraselists/intolerance/banned
+ install -o root -g wheel -m 644 ./phraselists/intolerance/weighted $I$(CONFFILELOCATION)phraselists/intolerance/weighted
+ install -o root -g wheel -m 644 ./phraselists/legaldrugs/weighted $I$(CONFFILELOCATION)phraselists/legaldrugs/weighted
+ install -o root -g wheel -m 644 ./phraselists/personals/weighted $I$(CONFFILELOCATION)phraselists/personals/weighted
+ install -o root -g wheel -m 644 ./phraselists/pornography/banned $I$(CONFFILELOCATION)phraselists/pornography/banned
+ install -o root -g wheel -m 644 ./phraselists/pornography/weighted $I$(CONFFILELOCATION)phraselists/pornography/weighted
+ install -o root -g wheel -m 644 ./phraselists/violence/weighted $I$(CONFFILELOCATION)phraselists/violence/weighted
+ install -o root -g wheel -m 644 ./phraselists/warezhacking/weighted $I$(CONFFILELOCATION)phraselists/warezhacking/weighted
+ install -o root -g wheel -m 644 ./phraselists/weapons/weighted $I$(CONFFILELOCATION)phraselists/weapons/weighted
+ install -o root -g wheel -m 644 ./bannediplist $I$(CONFFILELOCATION)bannediplist
+ install -o root -g wheel -m 644 ./banneduserlist $I$(CONFFILELOCATION)banneduserlist
+ install -o root -g wheel -m 644 ./bannedextensionlist $I$(CONFFILELOCATION)bannedextensionlist
+ install -o root -g wheel -m 644 ./bannedmimetypelist $I$(CONFFILELOCATION)bannedmimetypelist
+ install -o root -g wheel -m 644 ./bannedurllist $I$(CONFFILELOCATION)bannedurllist
+ install -o root -g wheel -m 644 ./bannedregexpurllist $I$(CONFFILELOCATION)bannedregexpurllist
+ install -o root -g wheel -m 644 ./bannedsitelist $I$(CONFFILELOCATION)bannedsitelist
+ install -o root -g wheel -m 644 ./exceptionsitelist $I$(CONFFILELOCATION)exceptionsitelist
+ install -o root -g wheel -m 644 ./exceptionurllist $I$(CONFFILELOCATION)exceptionurllist
+ install -o root -g wheel -m 644 ./exceptionuserlist $I$(CONFFILELOCATION)exceptionuserlist
+ install -o root -g wheel -m 644 ./exceptioniplist $I$(CONFFILELOCATION)exceptioniplist
+ install -o root -g wheel -m 644 ./pics $I$(CONFFILELOCATION)pics
+ install -o root -g wheel -m 644 ./template.html $I$(CONFFILELOCATION)template.html
+ install -o root -g wheel -m 755 ./dansguardian.bsdv $I$(SYSVLOCATION)start-dg.sh
+ install -o root -g wheel -m 755 ./dansguardian.pl $I$(CGIBINLOCATION)dansguardian.pl
chmod o+x $I$(CGIBINLOCATION)dansguardian.pl
- cp -f ./dansguardian.8.gz $I$(MANUALFILES)man8/dansguardian.8.gz
- chown -R $(PROXYUSER).$(PROXYGROUP) $I$(LOGLOCATION)
- chmod -R u+wr $I$(LOGLOCATION)
- chmod u+wrx $I$(LOGLOCATION)
+ install -o root -g wheel -m 644 ./dansguardian.8 $I$(MANUALFILES)man8/dansguardian.8
+ touch $I$(LOGLOCATION)dansguardian.log
+ chown $(PROXYUSER):$(PROXYGROUP) $I$(LOGLOCATION)dansguardian.log
uninstall:
rm -f $(BINARYLOCATION)dansguardian
@@ -81,7 +111,7 @@
rm -f $(CGIBINLOCATION)dansguardian.pl
rm -f $(MANUALFILES)man8/dansguardian.8.gz
rm -fr $(CONFFILELOCATION)
- rm -fr $(LOGLOCATION)
+ rm -f $(LOGLOCATION)dansguardian.log
clean:
rm -f $(OBJ) $(PROG)
|