Find the answer to your Linux question:
Results 1 to 7 of 7
I'm trying to autostart an Until URU server. I copied the script used to start the server to the /etc/rc.d/ directory. I used chmod +x to make it executable. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Ook
    Ook is offline
    Just Joined!
    Join Date
    Sep 2004
    Location
    Lebanon, Armpit, Oregon, USA
    Posts
    18

    Can't get program to autostart


    I'm trying to autostart an Until URU server. I copied the script used to start the server to the /etc/rc.d/ directory. I used chmod +x to make it executable. I can use the script to start and stop the server, so I know the script itself is OK. When I restart the machine, the program does not start. Am I missing something and is there more I need to do to make this program autostart?

  2. #2
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    You need to add a line executing that script to one of the initialization scripts. It would either go in rc.4 or rc.M, depending on whether you boot to init 4 or init 3.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  3. #3
    Linux Newbie
    Join Date
    Mar 2003
    Location
    Istanbul/Türkiye
    Posts
    246
    Actually you can add it to your /etc/rc.d/rc.local instead of rc.M.

    I suggest rc.local file for your own scripts..
    Just a Newbie....Looking 4 Info....

  4. $spacer_open
    $spacer_close
  5. #4
    Ook
    Ook is offline
    Just Joined!
    Join Date
    Sep 2004
    Location
    Lebanon, Armpit, Oregon, USA
    Posts
    18
    You can't just put the file in rc.d? I though that everything in that directory that was executable would automatically run, shows you how much I know...lol. OK, I'll add a line to rc.local and see what happens.

  6. #5
    Linux Newbie
    Join Date
    Mar 2003
    Location
    Istanbul/Türkiye
    Posts
    246
    Hmm i think that is not true. Not every file is automatically starts when the machine starts if you dont add those files to rc.M like sarumont told.This is why i suggest adding your script to rc.local. But if your script is too long like the other files you can put it to rc.d and add it to rc.M..
    Just a Newbie....Looking 4 Info....

  7. #6
    Ook
    Ook is offline
    Just Joined!
    Join Date
    Sep 2004
    Location
    Lebanon, Armpit, Oregon, USA
    Posts
    18
    I added a line to rc.local that executes the original script in it's original location, and that seems to work fine. Learn something new every day

  8. #7
    Linux Newbie
    Join Date
    Mar 2003
    Location
    Istanbul/Türkiye
    Posts
    246
    For linux, the alternatives are almost endless. So, you can find a way easily for your problem. This is why i like Linux
    Just a Newbie....Looking 4 Info....

Posting Permissions

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