1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
4 ###############################################################################
6 ###############################################################################
8 ###############################################################################
12 SUMMARY = SQUID Accounting IPFire extension
16 THISAPP = proxy-accounting-$(VER)
17 DIR_APP = $(DIR_SRC)/$(THISAPP)
18 TARGET = $(DIR_INFO)/$(THISAPP)
19 PROG = proxy-accounting
22 DEPS = perl-File-ReadBackwards
26 ###############################################################################
28 ###############################################################################
41 ###############################################################################
42 # Installation Details
43 ###############################################################################
45 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
47 @rm -rf $(DIR_APP) && mkdir $(DIR_APP) && cp -R $(DIR_SRC)/src/squid-accounting/ $(DIR_APP)
49 mkdir -p /var/ipfire/accounting/bill
50 mkdir -p /srv/web/ipfire/html/accounting/logo
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
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
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