You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Davide Frigerio <da...@wise-lab.it> on 2003/02/11 12:09:26 UTC
service under linux
Witch is the best way to run james as deamon under linux? Something about
watchdog?
Thanks.
Davide Frigerio.
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
Re: service under linux
Posted by bill parducci <bi...@parducci.net>.
testing tidbit:
for those who want to keep the console running, but don't want to stay
logged in i would suggest considering screen. not only does this keep
the session alive after you detach but it allows you to fire up numerous
'screens' where one can observe various log files, edit configs, etc. in
real time.
b
Eric Weidner wrote:
> If you are using 2.1, create a new file named /etc/init.d/james with the
> contents below. Replace /opt/james with your james location and adjust
> your JAVA_HOME location.
>
> Then create a symlink in /etc/rc3.d and/or /etc/rc5.d (depending on your
> default run level).
>
> In the /etc/rc3.d directory (or /etc/rc5.d):
> #ln -s ../init.d/james S98james
>
> James should start on boot.
>
> To manually start or stop james:
> #/etc/init.d/james stop
> #/etc/init.d/james start
>
>
>
> Eric Weidner
> Out-of-the-Box
> http://www.ejbsolutions.com
>
>
> ********************** BEGIN FILE BELOW ******************************
> #!/bin/sh
> # Startup script for James server
> #
> # description: Run James server
>
> [ -f /opt/james/bin/phoenix.sh ] || exit 0
>
> start() {
> echo -n "Starting James Server: "
> JAVA_HOME=/usr/java;export JAVA_HOME
> /opt/james/bin/phoenix.sh start
> RETVAL=$?
> echo
> return $RETVAL
> }
>
> stop() {
> echo -n "Shutting down James Server "
> /opt/james/bin/phoenix.sh stop
> echo
> return 0
> }
>
> case "$1" in
> start)
> start
> ;;
>
> stop)
> stop
> ;;
>
> *)
> echo "Usage: james {start|stop}"
> exit 1
>
> esac
>
> exit 0
> ************************ END FILE ABOVE ****************************
>
>
> Davide Frigerio wrote:
>
>> Witch is the best way to run james as deamon under linux? Something about
>> watchdog?
>>
>> Thanks.
>> Davide Frigerio.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: james-user-help@jakarta.apache.org
>>
>>
>>
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
RE: service under linux
Posted by "Noel J. Bergman" <no...@devtech.com>.
Eric,
Alternative instructions for those using a system like RedHat:
1. create a symlink from /usr/local/java to your java installation
2. create a symlink from /opt/james to your james installation
3. add the script file (below) to /etc/rc.d/init.d
4. run "chkconfig --add james"
You have to make sure that the script has the right permissions, and line
endings.
--- Noel
#!/bin/sh
# Startup script for James Mail server
#
# chkconfig: 345 95 92
# description: Run James Mail server
# processname: james
# Source function library.
. /etc/rc.d/init.d/functions
[ -f /opt/james/bin/phoenix.sh ] || exit 0
case "$1" in
start)
echo -n "Starting James Mail Server: "
export JAVA_HOME=/usr/local/java
/opt/james/bin/phoenix.sh start
echo
;;
stop)
echo -n "Shutting down James Mail Server "
/opt/james/bin/phoenix.sh stop
echo
;;
restart)
echo -n "Restarting James Mail Server "
/opt/james/bin/phoenix.sh restart
echo
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
Re: service under linux
Posted by Eric Weidner <es...@speakeasy.org>.
If you are using 2.1, create a new file named /etc/init.d/james with the
contents below. Replace /opt/james with your james location and adjust
your JAVA_HOME location.
Then create a symlink in /etc/rc3.d and/or /etc/rc5.d (depending on your
default run level).
In the /etc/rc3.d directory (or /etc/rc5.d):
#ln -s ../init.d/james S98james
James should start on boot.
To manually start or stop james:
#/etc/init.d/james stop
#/etc/init.d/james start
Eric Weidner
Out-of-the-Box
http://www.ejbsolutions.com
********************** BEGIN FILE BELOW ******************************
#!/bin/sh
# Startup script for James server
#
# description: Run James server
[ -f /opt/james/bin/phoenix.sh ] || exit 0
start() {
echo -n "Starting James Server: "
JAVA_HOME=/usr/java;export JAVA_HOME
/opt/james/bin/phoenix.sh start
RETVAL=$?
echo
return $RETVAL
}
stop() {
echo -n "Shutting down James Server "
/opt/james/bin/phoenix.sh stop
echo
return 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo "Usage: james {start|stop}"
exit 1
esac
exit 0
************************ END FILE ABOVE ****************************
Davide Frigerio wrote:
>Witch is the best way to run james as deamon under linux? Something about
>watchdog?
>
>Thanks.
>Davide Frigerio.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org