Hello and thank you for reading my post.

My question is about how can Tomcat be started at boot time as a non-root
user.

The OS is Debian Wheezy.

Below is what I did already:

root> chown -R tomcat7.tomcat7 /opt/tomcat7/

I created a new file: "/etc/init.d/tomcat7"
Owner and owner group: root
Permissions: 755
-------------------------------------------------------
#! /bin/sh

export JAVA_HOME=/opt/jdk1.7.0_67/
case $1 in

start)
  /bin/bash /opt/tomcat7/bin/startup.sh
  ;;

stop)
  /bin/bash /opt/tomcat7/bin/shutdown.sh
  ;;

restart)
  /bin/bash /opt/tomcat7/bin/shutdown.sh
  /bin/bash /opt/tomcat7/bin/startup.sh
  ;;
esac

exit 0
-------------------------------------------------------

I ran: 
root> update-rc.d tomcat7 defaults

Added to /etc/rc0.d/    : K01tomcat7
Added to /etc/rc1.d/    : K01tomcat7
Added to /etc/rc2.d/    : S17tomcat7
Added to /etc/rc3.d/    : S17tomcat7
Added to /etc/rc4.d/    : S17tomcat7
Added to /etc/rc5.d/    : S17tomcat7
Added to /etc/rc6.d/    : K01tomcat7

At boot time, tomcat is started as root.
How can it be started as tomcat7?

Best regards.



--
View this message in context: 
http://tomcat.10.x6.nabble.com/How-can-Tomcat-be-started-at-boot-time-as-a-non-root-user-tp5023810.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to