Re: System Wide Fetchmail (failed!)
Hi, I think you are on potato CD. (r2.2?) Newer woody version and
possibly newer potato bversion(r2.3?)should not suffe.
Short answer:
You need to set scriptfile location by -f option.
Long answer (See below):
On Sun, Aug 19, 2001 at 09:58:43AM +0100, Roland Hinkley wrote:
> I do still have a problem that is driving me mad. Fetchmail works fine
> when I start it as a user.
Yes. It is exactly I experienced, too.
> Unfortunately when it tries to start at boot I get the message that it
> has failed. It also does not start up from the fetchmail script within
> ip-up. I have created a fetchmailrc in /etc. there is a fetchmail
> entry in /etc/default.
Assuming you are starting fetchmail as root during boot scripti like I
id, without commandline option to specify file location. This is what
happens!
fetchmails look for fetchmailrc in home directory which is "/" in those
environment in debian. (It used to drive me crazy and I filed bug
report. It was marked fixed by maintainer after he includded his init.d script in
the newer package.) My /etc/init.d/fetchmail looks like following.
#!/bin/sh
#
# To start fetchmail as a system service, copy this file to
# /etc/init.d/fetchmail and run "update-rc.d fetchmail
# defaults 30". A fetchmailrc file containg hosts and
# passwords for all local users should be placed in /root
# and should contain a line of the form "set daemon <nnn>".
#
# To remove the service, delete /etc/init.d/fetchmail and run
# "update-rc.d fetchmail remove".
DAEMON=/usr/bin/fetchmail
#
# Patch to make sure to start in sysvinit
#
# Without following, fetchmail trys to read /.fetchmail instead of
# /root/fetchmail if started in sysvinit script. ($PWD=$HOME=/)
#FETCHMAILRC=/root/.fetchmailrc
FETCHMAILRC=/etc/fetchmailrc
set -e
test -f $DAEMON || exit 0
case "$1" in
start)
echo -n "Starting mail retrieval agent: "
if start-stop-daemon --start --exec $DAEMON -- -f $FETCHMAILRC; then echo "fetchmail."
else echo "fetchmail fail to start, maybe already running."; fi
;;
stop)
echo -n "Stopping mail retrieval agent: "
start-stop-daemon --stop --quiet --exec $DAEMON
echo "fetchmail."
;;
force-reload|restart)
echo -n "Restarting mail retrieval agent: "
start-stop-daemon --stop --quiet --exec $DAEMON
if start-stop-daemon --start --exec $DAEMON -- -f $FETCHMAILRC; then echo "fetchmail."
else echo "fetchmail fail to start, maybe already running."; fi
echo "fetchmail."
;;
*)
echo "Usage: /etc/init.d/fetchmail {start|stop|restart}"
exit 1
;;
esac
exit 0
----------------
Newr package use similar but slightly different script written by
maintainer but idea is same.
--
~\^o^/~~~ ~\^.^/~~~ ~\^*^/~~~ ~\^_^/~~~ ~\^+^/~~~ ~\^:^/~~~ ~\^v^/~~~
+ Osamu Aoki <debian@aokiconsulting.com>, GnuPG-key: 1024D/D5DE453D +
+ My debian quick-reference, http://www.aokiconsulting.com/quick/ +
Reply to: