]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - config/urlfilter/prebuild.pl
87b9e721acd927a176fe160459fd902cc1fbdd58
3 # This code is distributed under the terms of the GPL
5 # (c) written from scratch
7 # $Id: prebuild.pl,v 0.3 2005/04/16 00:00:00 marco Exp $
10 $dbdir="/var/ipfire/urlfilter/blacklists";
12 system("/usr/bin/squidGuard -C all");
14 if (-e
"$dbdir/custom/allowed/domains.db") { unlink("$dbdir/custom/allowed/domains.db"); }
15 if (-e
"$dbdir/custom/allowed/urls.db") { unlink("$dbdir/custom/allowed/urls.db"); }
16 if (-e
"$dbdir/custom/blocked/domains.db") { unlink("$dbdir/custom/blocked/domains.db"); }
17 if (-e
"$dbdir/custom/blocked/urls.db") { unlink("$dbdir/custom/blocked/urls.db"); }
19 system("chown -R nobody.nobody $dbdir");
21 foreach $category (<$dbdir/*>)
24 system("chmod 755 $category &> /dev/null");
25 foreach $blacklist (<$category/*>)
27 if (-f
$blacklist){ system("chmod 644 $blacklist &> /dev/null"); }
28 if (-d
$blacklist){ system("chmod 755 $blacklist &> /dev/null"); }
30 system("chmod 666 $category/*.db &> /dev/null");
35 # This code is distributed under the terms of the GPL
37 # (c) written from scratch
39 # $Id: prebuild.pl,v 0.3 2005/04/16 00:00:00 marco Exp $
42 $dbdir="/var/ipfire/urlfilter/blacklists";
44 system("/usr/bin/squidGuard -C all");
46 if (-e
"$dbdir/custom/allowed/domains.db") { unlink("$dbdir/custom/allowed/domains.db"); }
47 if (-e
"$dbdir/custom/allowed/urls.db") { unlink("$dbdir/custom/allowed/urls.db"); }
48 if (-e
"$dbdir/custom/blocked/domains.db") { unlink("$dbdir/custom/blocked/domains.db"); }
49 if (-e
"$dbdir/custom/blocked/urls.db") { unlink("$dbdir/custom/blocked/urls.db"); }
51 system("chown -R nobody.nobody $dbdir");
53 foreach $category (<$dbdir/*>)
56 system("chmod 755 $category &> /dev/null");
57 foreach $blacklist (<$category/*>)
59 if (-f
$blacklist){ system("chmod 644 $blacklist &> /dev/null"); }
60 if (-d
$blacklist){ system("chmod 755 $blacklist &> /dev/null"); }
62 system("chmod 666 $category/*.db &> /dev/null");
67 # This code is distributed under the terms of the GPL
69 # (c) written from scratch
71 # $Id: prebuild.pl,v 0.3 2005/04/16 00:00:00 marco Exp $
74 $dbdir="/var/ipfire/urlfilter/blacklists";
76 system("/usr/bin/squidGuard -C all");
78 if (-e
"$dbdir/custom/allowed/domains.db") { unlink("$dbdir/custom/allowed/domains.db"); }
79 if (-e
"$dbdir/custom/allowed/urls.db") { unlink("$dbdir/custom/allowed/urls.db"); }
80 if (-e
"$dbdir/custom/blocked/domains.db") { unlink("$dbdir/custom/blocked/domains.db"); }
81 if (-e
"$dbdir/custom/blocked/urls.db") { unlink("$dbdir/custom/blocked/urls.db"); }
83 system("chown -R nobody.nobody $dbdir");
85 foreach $category (<$dbdir/*>)
88 system("chmod 755 $category &> /dev/null");
89 foreach $blacklist (<$category/*>)
91 if (-f
$blacklist){ system("chmod 644 $blacklist &> /dev/null"); }
92 if (-d
$blacklist){ system("chmod 755 $blacklist &> /dev/null"); }
94 system("chmod 666 $category/*.db &> /dev/null");