Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just uninstalled tomcat6 and installed tomcat7, and now that I want to start, stop or restart the service, ubuntu shows the two of them, for example

sudo service tomcat

And then ubuntu shows two alternatives, for both tomcat6 and tomcat7, but I don't have and I don't want tomcat6 to appear there, What should I do?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

just clean the tomcat6 referred lines in /etc/init.d/tomcat could solve your question.

after clean the file may like that:

TOMCATPATH=/usr/share/apache-tomcat-7.0.27

case $1 in

start)
 echo “starting tomcat7 from $TOMCATPATH”
 sh $TOMCATPATH/bin/startup.sh
;;

stop)
 echo “stopping tomcat7 from $TOMCATPATH”
 sh $TOMCATPATH/bin/shutdown.sh
;;

restart)
 $0 stop
 $0 start
;;

*)
 echo $”usage: $0 {start|stop|restart}”
;;
esac

exsit 0

suggestion to uninstall a software:

sudo apt-get purge xxxx-software

purge will also removes config files.

share|improve this answer
    
It doesn't work. –  eLRuLL May 9 '13 at 16:20
    
@eLRuLL how did you uninstall tomcat6 and what's the content of /etc/init.d/tomcat –  Teifi May 10 '13 at 1:40
    
uninstall with apt-get remove tomcat6, and I have tomcat6 and tomcat7 on /etc/init.d/, about the content, they are both similar. –  eLRuLL May 10 '13 at 2:43
    
@eLRuLL updated answer, hope it could help u. –  Teifi May 10 '13 at 4:07
    
but there is no /etc/init.d/tomcat file there are both tomcat6 and tomcat7 files. –  eLRuLL May 10 '13 at 4:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.