Re: starting a process on reboot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dana Holland wrote:
I'm sure I'm not using the proper search times, but I just can't seem to find an answer to this on Google.

We're trying to set our server up to start Tomcat automatically on reboot. I have the proper scripts in init.d and rc.d, and it does start the server, but because it's not being started as the tomcat user, it's not functional. How can I make it start as the tomcat user?



This is what I do in mine (for Tomcat 4):

   if [ -x /etc/rc.d/init.d/functions ]; then
       daemon --user $TOMCAT_USER $TOMCAT_SCRIPT start
   else
       su - $TOMCAT_USER -c "$TOMCAT_SCRIPT start"
   fi

where:
TOMCAT_SCRIPT=${CATALINA_HOME}/bin/dtomcat4
TOMCAT_USER="tomcat4"

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
            University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@xxxxxxxxxxxx
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux