Results 1 to 4 of 4

Thread: Help Start a executable @ boot

  1. #1
    Join Date
    Apr 2009
    Beans
    2

    Question Help Start a executable @ boot

    Hello,

    im Currently working on a Small gaming server for my Multi gaming conumity.
    The server Runs on ubuntu Server edition 8.10 and i can access it using ssh.
    i'm Trying to start a Program @ ubuntu boot Its a executable.
    I'm a newbie with Linux
    Can someone please help me

    Greetings
    Eric

  2. #2
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: Help Start a executable @ boot

    Easiest way is to edit /etc/rc.local.

  3. #3
    Join Date
    Apr 2009
    Beans
    2

    Re: Help Start a executable @ boot

    Could you explain that please because I looked up to the file and din't understand it

  4. #4
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: Help Start a executable @ boot

    Let's say you want /usr/local/bin/myscript.sh to start at boot, and it runs continuously never exiting. You simply add this line before "exit 0".
    Code:
    /usr/local/bin/myscript.sh&
    So /etc/rc.local without comments would look like
    Code:
    #!/bin/sh -e
    /usr/local/bin/myscript.sh&
    exit 0
    If the executable runs then exits, you don't need the "&", which forces the command into the background so the script can continue.

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
  •