I used the script found at http://www.scalix.com/community/viewtopic.php?t=529
When I try to run it I get, ": No such file or directory"
What is wrong?
Moderators: ScalixSupport, admin
Code: Select all
###### !! PLEASE CHANGE THE FOLLOWING 3 LINES TO MATCH YOUR ENVIRONMENT !! ######
CATALINA_HOME="/home/jakarta-tomcat-5.0.19"
###### !! YOU SHOULD NOT NEED TO CHANGE ANYTHING BELOW HERE !! ######
Code: Select all
#!/bin/sh
#
# chkconfig: 345 91 10
#
# description: \
# This is the init script for starting up the Jakarta Tomcat server.
#
# To install this script on a RedHat or SuSE Linux system, follow these steps:
#
# (1) log in as root
# (2) copy this script to /etc/init.d
# (3) enter "chmod 755 /etc/init.d/scalix-tomcat"
# (4) edit the script using vi or your favorite editor and ensure that
# CATALINA_HOME points to the location of your Tomcat 4 or 5 (or later)
# directory
# (5) enter "chkconfig --add scalix-tomcat"
#
# Tomcat will now be configured to start as a system service when the
# machine boots.
#
# (6) enter "/etc/init.d/scalix-tomcat start" to manually start Tomcat and
# "/etc/init.d/scalix-tomcat stop" to manually stop Tomcat.
#
###### !! PLEASE CHANGE THE FOLLOWING 3 LINES TO MATCH YOUR ENVIRONMENT !! ######
CATALINA_HOME="/root/jakarta-tomcat-5.0.28"
###### !! YOU SHOULD NOT NEED TO CHANGE ANYTHING BELOW HERE !! ######
export CATALINA_HOME
# you do not need to change anything below here
# detect the distribution:
if [ -f /etc/redhat-release -o -f /etc/fedora-release ] ; then
DISTRIBUTION="redhat"
elif [ -f /etc/SuSE-release ] ; then
DISTRIBUTION="suse"
else
echo "Error: unsupported distribution" >&2
exit 1
fi
# Source function library.
[ "$DISTRIBUTION" = "redhat" ] && . /etc/init.d/functions
[ "$DISTRIBUTION" = "suse" ] && . /etc/rc.status
# test if network is up (redhat-only):
if [ "$DISTRIBUTION" = "redhat" ] ; then
# Get config.
. /etc/sysconfig/network
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
fi
startup=$CATALINA_HOME/bin/startup.sh
shutdown=$CATALINA_HOME/bin/shutdown.sh
# Where the Scalix server admin commands live (for Scalix server installed locally)
PATH=$PATH:/opt/scalix/bin; export PATH
# Functions
if [ "$DISTRIBUTION" = "redhat" ] ; then
start() {
action $"Starting Tomcat service: " $startup
RETVAL=$?
}
stop() {
action $"Stopping Tomcat service: " $shutdown
RETVAL=$?
}
elif [ "$DISTRIBUTION" = "suse" ] ; then
start() {
echo -n "Starting Tomcat service"
$startup
rc_status -v
}
stop() {
echo -n "Stoppping Tomcat service"
$shutdown
rc_status -v
}
fi
restart() {
stop
start
}
[ "$DISTRIBUTION" = "suse" ] && rc_reset
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
[ "$DISTRIBUTION" = "suse" ] && rc_exit
exit 0
Users browsing this forum: No registered users and 3 guests