Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 168075 - net-proxy/squid - /etc/cron.weekly/squid.cron errors if squid is not running
Summary: net-proxy/squid - /etc/cron.weekly/squid.cron errors if squid is not running
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Network Proxy Developers (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-23 00:50 UTC by edoceo
Modified: 2007-02-25 20:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to squid.cron (squid.cron.patch,426 bytes, patch)
2007-02-23 00:52 UTC, edoceo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description edoceo 2007-02-23 00:50:51 UTC
When squid is not running, i.e. /var/run/squid.pid is not present this cron job exits with a error level 1 status, but no output indicating the error.  Then I get silly emails from cron :(

I'd really like this script to exit error level 0 if it cannot find that file.
I'll attach a patch that works to my desire.

Thanks!
Comment 1 edoceo 2007-02-23 00:52:09 UTC
Created attachment 111016 [details, diff]
Patch to squid.cron

This makes it so that this cron job only executes if it can find the squid pid file, otherwise it silently exits
Comment 2 Alin Năstac (RETIRED) gentoo-dev 2007-02-23 07:49:48 UTC
huh? what cron daemon do you use?
My vixie-cron don't send emails unless scripts actually write something to stdout or stderr, regardless of what their return code might be.
Comment 3 edoceo 2007-02-23 21:21:18 UTC
I use:

[ebuild   R   ] sys-process/fcron-3.0.2  USE="-debug -doc pam (-selinux)"

The message subject:
fcron <root@server> /bin/run-parts /etc/cron.weekly

The message body:
run-parts: /etc/cron.weekly/squid.cron exited with return code 1
Job /bin/run-parts /etc/cron.weekly terminated (exit status: 1) (mailing output)
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2007-02-25 20:31:34 UTC
Fixed in squid-2.6.9-r1. Thanks!