Results 1 to 5 of 5

Thread: Running Script on Startup

  1. #1
    Join Date
    Feb 2012
    Beans
    8

    Running Script on Startup

    Hello, I am a Linux newbie and I have spent the last several hours trying to get the no-ip client application installed and working on my fresh install of Ubuntu. It works, and I can run the application and see that it is working. However, I want the application to start when the computer starts. (Before login)

    I have placed the following .sh file in /etc/init.d/
    /usr/local/bin/noip2
    However, when I login I can run this command:
    sudo /usr/local/bin/noip2 -S

    And it tells me that there are no instances of noip2 running. I think the problem is that I have to use sudo to start noip2, otherwise it tells me:
    Can't locate configuration file /usr/local/etc/no-ip2.conf. (Try -c). Ending!
    And I know for a fact that file does exist. When I use sudo it does not complain at all and noip2 starts.

    Being a total newbie, I am not really sure what to even look for next, so any help is much appreciated.

    Thanks,
    Grant

  2. #2
    Join Date
    Oct 2008
    Location
    Down Under
    Beans
    1,566
    Distro
    Xubuntu 12.10 Quantal Quetzal

  3. #3
    Join Date
    Feb 2012
    Beans
    8

    Re: Running Script on Startup

    That was actually the first thing I tried. For the command I put in:
    /usr/local/bin/noip2

    I also tried:
    sudo /usr/local/bin/noip2

    After restarting the program was not running. The second command starts the program when typed directly into the Terminal.

  4. #4
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,649
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Running Script on Startup

    Where did you get the noip2 program?? I'll try it on my end!

  5. #5
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,649
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Running Script on Startup

    Ok -- figured it out -- rebooted and you can see the process is running:

    sudo ps -aux | grep noip
    [sudo] password for kevdog:
    Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
    nobody 1724 0.0 0.0 2380 784 ? Ss 00:57 0:00 /usr/local/bin/noip2
    kevdog 2076 0.0 0.0 4448 796 pts/0 S+ 00:57 0:00 grep --color=auto noip

    What you need to do is edit (as root!!!) your /etc/rc.local file and put /usr/local/bin/noip2
    before the exit 0 line.

    That's it!! Done!!

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
  •