]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - lfs/proxy-accounting
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / lfs / proxy-accounting
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
4 ###############################################################################
5
6 ###############################################################################
7 # Definitions
8 ###############################################################################
9
10 include Config
11
12 SUMMARY = SQUID Accounting IPFire extension
13
14 VER = 1.0.4
15
16 THISAPP = proxy-accounting-$(VER)
17 DIR_APP = $(DIR_SRC)/$(THISAPP)
18 TARGET = $(DIR_INFO)/$(THISAPP)
19 PROG = proxy-accounting
20 PAK_VER = 14
21
22 DEPS = perl-File-ReadBackwards
23
24 SERVICES =
25
26 ###############################################################################
27 # Top-level Rules
28 ###############################################################################
29
30 install : $(TARGET)
31
32 check :
33
34 download :
35
36 b2 :
37
38 dist:
39 @$(PAK)
40
41 ###############################################################################
42 # Installation Details
43 ###############################################################################
44
45 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
46 @$(PREBUILD)
47 @rm -rf $(DIR_APP) && mkdir $(DIR_APP) && cp -R $(DIR_SRC)/src/squid-accounting/ $(DIR_APP)
48 cd $(DIR_APP)
49 mkdir -p /var/ipfire/accounting/bill
50 mkdir -p /srv/web/ipfire/html/accounting/logo
51
52 #Touch Logfile
53 touch /var/log/accounting.log
54 chmod 777 /var/log/accounting.log
55 #Set permissions for logo and graphs
56 chmod -R 777 /srv/web/ipfire/html/accounting
57
58 install -v -m 755 $(DIR_APP)/squid-accounting/accounting.cgi /srv/web/ipfire/cgi-bin/
59 install -v -m 755 $(DIR_APP)/squid-accounting/acct.pl /usr/local/bin/
60 install -v -m 644 $(DIR_APP)/squid-accounting/acct-lib.pl /var/ipfire/accounting/
61 install -v -m 644 $(DIR_APP)/squid-accounting/acct.de.pl /var/ipfire/addon-lang/
62 install -v -m 644 $(DIR_APP)/squid-accounting/acct.en.pl /var/ipfire/addon-lang/
63 install -v -m 644 $(DIR_APP)/squid-accounting/acct.fr.pl /var/ipfire/addon-lang/
64 install -v -m 644 $(DIR_APP)/squid-accounting/acct.tr.pl /var/ipfire/addon-lang/
65 install -v -m 644 $(DIR_APP)/squid-accounting/EX-squid-accounting.menu /var/ipfire/menu.d/
66 install -v -m 755 $(DIR_APP)/squid-accounting/dbinstall.pl /var/ipfire/accounting/
67 install -v -m 644 $(DIR_APP)/squid-accounting/config/backup/includes/squid-accounting \
68 /var/ipfire/backup/addons/includes/proxy-accounting
69
70 #activate hourly logging of proxy logfile
71 ln -sf /usr/local/bin/acct.pl /etc/fcron.hourly/squid-accounting
72 chown -R nobody.nobody /var/ipfire/accounting
73 @rm -rf $(DIR_APP)
74 @$(POSTBUILD)
75