Results 1 to 7 of 7

Thread: start a program as service during boot

  1. #1

    start a program as service during boot

    I've just put Jakarta-tomcat on my system and am trying to get it to start at boot time and have no clue how to do it. I've been googlig for the last hour on how to do it but no such luck. Can someone please help me out with this? tnx.-

  2. #2
    Mentor jro's Avatar
    Join Date
    May 2004
    Location
    Pennsylvania, USA
    Posts
    1,206
    Do you want to run Tomcat as root or a specific user? You can do it either way, here's how. I am assuming you have root access to this box. Add this to the end of you /etc/rc.local file

    Code:
    su <user> -c <command>
    This will issue <command> as <user>. Since rc.local is run by root you don't need to enter a password to su to another user. If you want just run it just as root you can just enter the command to start the server at the end of the file. You might have to redirect the output to /dev/null if you are using Tomcat 3, I know it likes to dump everything to STDOUT I am not completely sure how that would be handled.

    Let me know if that works for you.
    jro - http://jeff.robbins.ws
    Linux counter#:213782
    GnuPG ID: 406238E7

  3. #3
    unfortunately it didn't help. I'm using SuSE 9.1 and it has no rc.local. I tried to insert that line in boot.local but it's called too soon in the boot process and I get various error messages.

    I've searched some more and there is actually a /etc/init.d/skeleton file which is a template for creating the boot scripts. this file is a bit too much for me. Since I have to put a lot of stuff in that file that I have no idea what it means. :?

    Then run the insserv <service_name> to create the init script and make all the necessary symlinks to the... yeah. As I said, a bit too much for me. I found that info at http://elibrary.fultus.com/technical...e_en/ch13.html

  4. #4
    Mentor jro's Avatar
    Join Date
    May 2004
    Location
    Pennsylvania, USA
    Posts
    1,206
    Hmm, do you have a /etc/conf.d/local.start file? Then again, that might be a Gentoo only file local start file. It's worth a look anyway...
    jro - http://jeff.robbins.ws
    Linux counter#:213782
    GnuPG ID: 406238E7

  5. #5
    I guess it's Gentoo only, cause SuSE uses /etc/init.d for booting stuff. There is actually /sbin/init.d but there are only files SuSEconfig.* where * is apache2, alljava, automake...

  6. #6
    switched to Slack. better now, 8)

  7. #7
    Mentor jro's Avatar
    Join Date
    May 2004
    Location
    Pennsylvania, USA
    Posts
    1,206
    Thats good. 'Cause I was out of ideas... :-(
    jro - http://jeff.robbins.ws
    Linux counter#:213782
    GnuPG ID: 406238E7

Similar Threads

  1. Universal remote boot and administration service
    By sportyidiot in forum General Chat
    Replies: 0
    Last Post: 02-02-2012, 07:57 PM
  2. Suse 10.1, Start program on boot
    By vwgtiturbo in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 05-17-2006, 06:11 PM
  3. How Do I start GUI Based Service during Linux boot process
    By uday in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 07-22-2004, 02:40 PM
  4. default mail program to start when clicking on a mail link
    By bobblebob in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 04-19-2003, 06:13 PM
  5. Replies: 2
    Last Post: 12-12-2002, 05:51 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •