6

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 ?

Patryk
  • 14,096
  • 1
    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". –  Apr 18 '12 at 14:06

1 Answers1

4

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.

sr_
  • 15,384