David, Below is the script I use on Redhat FC3 to start up james. It is
the same as what I used on FC2. I put it in James' bin and created a
softlink from /etc/init.d/james to this file. Make sure it is
executable by root and check the JAVA_HOME path. To make it run at boot
time, run the command
chkconfig --add james
as root. Then you can use
/sbin/service james start
to start it and it should start at boot time. Make sure you have no
other apps running on say ports 25 and 110 depending on how you have
james configurred.
-- Bud
#!/bin/sh
# description: James is a 100% pure Java SMTP and POP3 Mail server, and
NNTP News server designed to be a complete and portab
le enterprise mail/messaging engine solution based on currently
available open messaging protocols.
#
# Amongst the benefits of James over other mail platforms is its support
for building custom mail handling applications.
# chkconfig: 2345 99 00
#
#### $ chkconfig --add james
export JAVA_HOME=/usr/java/jdk1.5.0_02
case "$1" in
'start')
echo "Starting James Mail Server: "
/usr/local/james-2.2.0/bin/phoenix.sh start
touch /var/lock/subsys/james
;;
'stop')
echo "Stoping James Mail Server: "
/usr/local/james-2.2.0/bin/phoenix.sh stop
rm -f /var/lock/subsys/james
;;
'restart')
echo "Restarting James Mail Server: "
/usr/local/james-2.2.0/bin/phoenix.sh restart
;;
*)
echo "Usage: $0 { start | stop | restart }"
;;
esac
exit 0
David Legg wrote:
Hi,
I'm trying James again after a two year gap. I previously ran James on a
Windows server but am now using it it on a Redhat FC2 system.
I've followed the Wiki page (http://wiki.apache.org/james/RunAsService) as
closely as I can to get James running as a service but it just won't
automatically start at boot time. If I manually run a command like
'/etc/init.d/james start' it is fine.
I've tried looking at various log files but I can't see any major problems.
I'm open to suggestions as I obviously don't want our email service to
disappear any time the server is rebooted.
I have seen one or two people suggest using the jsvc application used by
Tomcat. I think this is a splendid idea as I too would like to run it as
something other than root. I had a quick look into this when I was setting the
system up and came away with the impression that the Daemon loader object has
to support an 'init' method instead of a 'Main' method for this to work. If
anyone has successfully managed this... let me know!
Thanks,
David Legg.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]