Greetings,

I'm a new user (at least attempting to be) of Qpopper.  I'm trying to get it
to startup as a daemon at runlevel 3 on a SuSE Linux 8.0 (2.4.18 kernel)
machine.

I found the following script in Mickey Hill's MIMEDefang Howto and tried to
use it, but it doesn't work.  I'm not sure if that is because SuSE puts
things in different places, or some other reason.  If anyone can tell me
what wrong, or give me a different script to try, I'd appreciate it.

I'm assuming (which means I'm probably wrong) that the problem has to do
with the absence of the functions file, but I'm not sure where that is
supposed to come from (i.e. part of qpopper or part of the system or
somewhere else).

Best Regards
Matt Thomas

#####################################################
#!/bin/sh
# startup script for popper
#

# source function library
# script gets an error on this line since this file doesn't exist
# There is only one functions file on the machine (/etc/sysconfig/network \
# /functions) which generates a different error if substituted
. /etc/rc.d/init.d/functions

[-f /usr/sbin/popper] || exit 0
# if you comment out the functions line the above with produce an error

prog="popper"

start(){
  echo -n $"Starting $prog: "
  daemon /usr/local/sbin/popper -s
# commenting out both the functions line and the "-f" line causes a
# "daemon command not found" error
  RETVAL=$?
  [$RETVAL -eq 0] && touch /var/lock/subsys/popper
  echo
  return $RETVAL
}

stop(){
  if test "x`pidof popper`" !=x;then
    echo -n $"Stopping $prog: "
    killproc popper
    echo
  fi
  RETVAL=$?
  [$RETVAL -eq 0] && rm -f /var/lock/subsys/popper
  return $RETVAL
}

case "$1" in
  start)
    start
    ;;

  stop)
    stop
    ;;

  status)
    status popper
    ;;
  restart)
    stop
    start
    ;;
  condrestart)
    if test "x`pidof popper`" !=x;then
      stop
      start
    fi
    ;;

  *)
    echo $"Usage: $0 {start|stop|restart|condrestart|status}"
    exit 1

esac

exit 0

# end qpopper startup
##############################################################

Reply via email to