A
A
Alex2014-10-03 01:05:59
C++ / C#
Alex, 2014-10-03 01:05:59

How to write background program for ubuntu?

For convenience, I decided to write for myself a small utility for ubuntu. The problem is, I've never done this before. The task is as follows:
When you enter a command, the
~$ myprog startProgram starts and sends a GET request to a remote server at intervals, say, 30 seconds. Depending on the answer, it displayed a standard notification in ubuntu with the text of the answer.
And on command
~$ myprog stopit turned off.
Question: where can I find documentation, a description, or some examples of such an implementation?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
prometian, 2014-10-03
@prometian

Read about demons in Linux, you can find many "skeletons" of similar projects. For example habrahabr.ru/post/129207

E
EgorKluch, 2014-10-03
@EgorKluch

shell+curl. I don’t understand Shell well, so for convenience I would do what I can.
To display a message, I would use something like
NodeJS: nodejs.org/api/child_process.html
PHP: php.net/manual/en/function.shell-exec.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question