Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I wonder how can I make a regular application like for instance noip2 updater a system process. I use Debian 6.0.2. For now I have it like this :

  • the binary is in the /usr/local/bin/ as noip2 file
  • the 'script' that launches is added to /etc/rc.local

How can I make it a system service to be able to run/stop it with e.g. service command ?

share|improve this question
    
You should probably tell us (Unix and Linux users) what makes something a "service", and what the "service" command does. I have only a vague idea how that relates to the Unix/Linux idea of a "daemon process". –  Bruce Ediger Apr 18 '12 at 14:06
add comment

1 Answer 1

up vote 2 down vote accepted

From what I found, noip2 includes the script /etc/init.d/noip2, (also here, for those not running Debian right now) which should already be all you need. I'm not sure how services interacts with the scripts in /etc/init.d, but in general you could run

/etc/init.d/noip2 start

to start the noip2 service and

/etc/init.d/noip2 stop

to stop it. Have a look at the script, it shows how to wrap any such process into a system service (with a pidfile, for example) using start-stop-daemon.

share|improve this answer
    
Thanks for the reply. As I see noip is not available for squeeze link –  Patryk Apr 18 '12 at 12:09
    
Indeed, it has been removed and there is no maintainer. (See also this bug report.) Probably time to (a) take over maintaining the package or (b) look for an alternative. –  sr_ Apr 18 '12 at 12:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.