I added a startup script to my James installation (SunOS 5.8, similar in
Linux) in /etc/rc3.d/S42James
(my script happens to be named S42James, the name doesn't matter)
paths may differ, especially ${james_home}
If you need to restart James: /etc/rc3.d/S42James restart
---------------------------------------------------------------------
#!/bin/sh
james_home=/usr/local/smtp
logfile=/var/opt/james/std_out_err.log
case "$1" in
  start)
        if [ ! -f ${james_home}/bin/run.sh ]; then
           echo "Cannot find ${james_home}/bin/run.sh. Skipping JAMES start.
 >&2
           exit 0
        fi
        # Start daemons.
        echo "Starting JAMES (Java Apache Mail Enterprise Server) ..."
        echo ""                         >> $logfile
        echo "James started: `date`"    >> $logfile
        echo ""                         >> $logfile
        ( cd ${james_home}/bin
          JAVA_HOME=/usr/j2se; export JAVA_HOME
          ./run.sh >>$logfile 2>&1
        ) &
        ;;
  stop)
        # Stop daemons.
        pkill -f -u 0 '/java .*-jar phoenix-loader.jar'
        if [ $? -eq 0 ]; then
           echo ""                      >> $logfile
           echo "James stopped: `date`" >> $logfile
           echo ""                      >> $logfile
        fi
        ;;
  restart)
        /etc/init.d/james stop
        sleep 2
        /etc/init.d/james start
        ;;
  *)
        echo "Usage: ${0} {start|stop}"
        exit 1
        ;;
esac
exit 0
---------------------------------------------------------------------
--rauno

-------Original Message-------

From: James Users List
Date: den 13 februari 2002 18:21:46
To: James Users List
Subject: RE: JAMES shuts down when ssh session ends

Is this a bug in JAMES?

-----Original Message-----
From: Danny Angus [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 10:14 AM
To: James Users List
Subject: RE: JAMES shuts down when ssh session ends


so do I and if you "logout" or "exit" daemon processes started with "&" will
keep on running, but if you just close the terminal they stop.

> -----Original Message-----
> From: test [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 4:36 PM
> To: James Users List
> Subject: JAMES shuts down when ssh session ends
>
>
> I use ssh instead of telnet. When I login to my server with ssh and start
> james using "./run.sh &" and then close my terminal/ssh session JAMES will
> shutdown too. I looked at my processes "ps -A f" and noticed that JAMES is
> starting as a child process of my ssh session. How do I start
> JAMES remotely
> without it starting as a child process of ssh. Shouldn't the "&" allow for
> this?
>
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]
org>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]
org>




--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]
org>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]
org>

.


Reply via email to