Annotated edit history of
DansGuardian version 14, including all changes.
View license author blame.
Rev |
Author |
# |
Line |
12 |
AristotlePagaltzis |
1 |
[DansGuardian | http://dansguardian.org/] is a WebProxy with phrase based filtering, useful for schools or other institutions which can't afford to have children viewing pornography. It is [GPL]ed, but uses a weird scheme placing restrictions on the permission to download it for commercial users. |
10 |
JohnMcPherson |
2 |
|
12 |
AristotlePagaltzis |
3 |
!! Notes |
10 |
JohnMcPherson |
4 |
|
14 |
CraigBox |
5 |
! My DansGuardian is dying at 6:45 every morning |
10 |
JohnMcPherson |
6 |
|
14 |
CraigBox |
7 |
Chances are pretty good that it is failing during morning maintenance. The logrotate script is the one to blame here, and DansGuardian's poor ability to restart cleanly and quickly. I modified my __logrotate.d__ script (this is under [Debian] and might differ from other [LinuxDistribution]s) by doing the following: |
10 |
JohnMcPherson |
8 |
|
|
|
9 |
cat > /etc/logrotate.d/dansguardian << EOF |
|
|
10 |
/var/log/dansguardian/access.log { |
|
|
11 |
rotate 31 |
|
|
12 |
daily |
|
|
13 |
prerotate |
14 |
CraigBox |
14 |
/etc/init.d/dansguardian stop || true |
10 |
JohnMcPherson |
15 |
endscript |
|
|
16 |
postrotate |
14 |
CraigBox |
17 |
sleep 2 && /etc/init.d/dansguardian start || \ |
10 |
JohnMcPherson |
18 |
(sleep 2; /etc/init.d/dansguardian start) |
|
|
19 |
endscript |
|
|
20 |
} |
|
|
21 |
EOF |
|
|
22 |
|
14 |
CraigBox |
23 |
This just adds in a sleep and a second attempt to restart DansGuardian if the first fails (the || will execute only if the output from the init script is a fail code). |