[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Help setting up a daemon



   I've been using fetchpop to grab my mail from my ISP.  I recently got
diald up and working and now I want to run fetchpop as a daemon process.
I've set up a script (using apmd as a guide) in /etc/init.d called
fetchpop and it contains the following:

#! /bin/sh
#
# Start or stop fetchpop as a daemon.
#

test -s /usr/bin/fetchpop || exit 0

case "$1" in
  start)
    echo "Starting fetchpop as a mail daemon"
    start-stop-daemon --start --quiet --exec /bin/su -- redwards -l -c "/usr/bin/fetchpop -d -r -l ~/fetchpop.log"
    ;;
  stop)
    echo "Stopping the fetchpop daemon process"
    start-stop-daemon --stop --quiet --oknodo --exec /usr/bin/fetchpop -- -q
    rm /home/redwards/.lockfetch-golgotha
    ;;
  *)
    echo "Usage: /etc/init.d/fetchpop {start|stop}"
    exit 1
esac

exit 0

   Then I went into each of the rc0.d through rc6.d subdirectories and
created a symbolic link called K40fetchpop.  This link simply points to
../init.d/fetchpop.

   If boot the system and log in as root, go into /etc/init.d and type
"fetchpop start" the program works perfectly.  Likewise, a similar
"fetchpop stop" works fine too.  But for some reason, the program isn't
getting started automatically at bootup.  Can anyone see an error and/or
tell me why/what I'm doing wrong?  If so, I'd greatly appreciate it along 
with any suggestions you might have.

                          |      __      o
 Regards,                 |     / /     _  _  _  _  _ __  __
 .                        |    / /__  / / / \// //_// \ \/ /
 Randy                    |   /____/ /_/ /_/\/ /___/  /_/\_\
 (redwards@together.net)  |   ...because reboots are for upgrades...


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: