Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Я дурак или где?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Russian
View previous topic :: View next topic  
Author Message
Cyc_Lone
n00b
n00b


Joined: 07 Mar 2004
Posts: 41
Location: Moscow

PostPosted: Wed Jul 28, 2004 5:33 pm    Post subject: Я дурак или где? Reply with quote

cd /etc/init.d && ./tomcat5 start

* Starting Tomcat...
Unable to cd to "/opt/tomcat" [ !! ]

Мдя!
делаем echo $CATALINA_HOME
получаем /opt/tomcat5

делаем cd $CATALINA_HOME, попадаем в /opt/tomcat5


less /etc/init.d/tomcat5

#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-www/tomcat/files/5.0.27/tomcat.init,v 1.1 2004/07/27 13:05:00 axxo Exp $

depend() {
need net
use dns logger mysql postgresql
}

start() {
ebegin "Starting Tomcat"
cd ${CATALINA_HOME}
su - ${CATALINA_USER} -c "${CATALINA_HOME}/bin/catalina.sh ${TOMCAT_START}"
eend $?
}

stop() {
ebegin "Stopping Tomcat"
su - ${CATALINA_USER} -c "${CATALINA_HOME}/bin/catalina.sh ${TOMCAT_STOP}"
sleep 2
eend $?
}

restart() {
ebegin "Restarting Tomcat"
su - ${CATALINA_USER} -c "${CATALINA_HOME}/bin/catalina.sh ${TOMCAT_STOP}"
sleep 5
cd ${CATALINA_HOME}
su - ${CATALINA_USER} -c "${CATALINA_HOME}/bin/catalina.sh ${TOMCAT_START}"
eend $?
}

Меняем в скрипте все переменные на реальные пути и команды - получаем ту же ошибку.

Ладно, делаем ln -s /opt/tomcat5 /opt/tomcat Опа! Всё пашет.

Так всё-таки чего ему надо? Меня в принципе всё это не особо напрягает, пусть и символической ссылке ходит, но где оно упорно берёт путь /opt/tomcat ?
_________________
With best regards, Cyclone.
Back to top
View user's profile Send private message
Cyc_Lone
n00b
n00b


Joined: 07 Mar 2004
Posts: 41
Location: Moscow

PostPosted: Wed Jul 28, 2004 5:46 pm    Post subject: Reply with quote

Вопрос снят. Решение: пользователь tomcat был с Home Directory /opt/tomcat которой, естественно не существовало. Вот только каким боком Home Directory влияет на стартовые скрипты? Кто знает ответ?
_________________
With best regards, Cyclone.
Back to top
View user's profile Send private message
ABVGD
n00b
n00b


Joined: 17 Sep 2003
Posts: 41
Location: Russia, St.-Petersburg

PostPosted: Wed Jul 28, 2004 10:58 pm    Post subject: Reply with quote

В скрипте используется "su -".
Back to top
View user's profile Send private message
deadlyFROZEN
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2004
Posts: 114

PostPosted: Thu Jul 29, 2004 8:09 am    Post subject: Reply with quote

Quote:
Я дурак или где?

Если уж ты спросил...
Конечно ты дурень :twisted:
_________________
...whether tis nobler? from the win to suffer,
from the bugs ´n issues of a commercial system
or to raise your mind against a sea of troubles,
and by a LINUX end them?...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Russian All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum