Hi Folks,
I'd like to use "start-stop-daemon" on my centos-machine. I know , it's debian-like. But I can't find "startproc" on my machine nor in the repos.
What is the CentOS-replacement for "start-stop-daemon"?
Thx
Timothy
P.S. I found a start-stop-daemon.c script - but how to compile it?
gcc start-stop-daemon.c
ends in much errors.
thus Timothy Kesten spake:
Hi Folks,
I'd like to use "start-stop-daemon" on my centos-machine. I know , it's debian-like. But I can't find "startproc" on my machine nor in the repos.
What is the CentOS-replacement for "start-stop-daemon"?
Thx
Timothy
P.S. I found a start-stop-daemon.c script - but how to compile it?
gcc start-stop-daemon.c
ends in much errors.
Do you have some more details, e.g. gcc's fall-out (error messages)?
Timo
Am Sonntag, 4. April 2010 17:15:11 schrieb Timo Schoeler:
Do you have some more details, e.g. gcc's fall-out (error messages)?
Sorry, output is in german on my machine
start-stop-daemon.c: In function »do_help«: start-stop-daemon.c:113: Fehler: fehlendes abschließendes Zeichen " start-stop-daemon.c:116: Fehler: expected »)« before »start« start-stop-daemon.c:116: Fehler: verirrtes »\« im Programm start-stop-daemon.c:116: Fehler: verirrtes »\« im Programm start-stop-daemon.c:116: Fehler: verirrtes »\« im Programm start-stop-daemon.c:116: Fehler: verirrtes »\« im Programm start-stop-daemon.c:116: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:124:48: Warnung: Zeichenkonstante zu lang für ihren Typ start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: fehlendes abschließendes Zeichen " start-stop-daemon.c:133: Fehler: expected »;« before »}« token
Timothy
P.S. perhaps you are a german?
Do you have some more details, e.g. gcc's fall-out (error messages)?
Sorry, output is in german on my machine
start-stop-daemon.c: In function »do_help«: start-stop-daemon.c:113: Fehler: fehlendes abschließendes Zeichen " start-stop-daemon.c:116: Fehler: expected »)« before »start« start-stop-daemon.c:116: Fehler: verirrtes »\« im Programm start-stop-daemon.c:116: Fehler: verirrtes »\« im Programm start-stop-daemon.c:116: Fehler: verirrtes »\« im Programm start-stop-daemon.c:116: Fehler: verirrtes »\« im Programm start-stop-daemon.c:116: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:124:48: Warnung: Zeichenkonstante zu lang für ihren Typ start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: verirrtes »\« im Programm start-stop-daemon.c:122: Fehler: fehlendes abschließendes Zeichen " start-stop-daemon.c:133: Fehler: expected »;« before »}« token
Timothy
P.S. perhaps you are a german?
Indeed I am, however I have to say that I don't understand what gcc wants to tell us.
Could you provide the lines 110 to 140 of start-stop-daemon.c?
Timo
On Sun, Apr 4, 2010 at 11:13 AM, Timothy Kesten centos-lst@gmx.de wrote:
Hi Folks,
I'd like to use "start-stop-daemon" on my centos-machine. I know , it's debian-like. But I can't find "startproc" on my machine nor in the repos.
What is the CentOS-replacement for "start-stop-daemon"?
There's no real equivalent, but the "service" command is the main method of starting/stopping processes/daemons. In itself it doesn't do what the start-stop-daemon does, but the scripts associated with the service utility can be customized to mimic some similar functions.
Am Sonntag, 4. April 2010 17:37:02 schrieb Kwan Lowe:
There's no real equivalent, but the "service" command is the main method of starting/stopping processes/daemons. In itself it doesn't do what the start-stop-daemon does, but the scripts associated with the service utility can be customized to mimic some similar functions.
My goal is:
start a service/daemon using init.d-script with user != root in a correct way.
One solution is using su/sudo - but is that "clean"?
Timothy
Timothy Kesten wrote:
Am Sonntag, 4. April 2010 17:37:02 schrieb Kwan Lowe:
There's no real equivalent, but the "service" command is the main method of starting/stopping processes/daemons. In itself it doesn't do what the start-stop-daemon does, but the scripts associated with the service utility can be customized to mimic some similar functions.
My goal is:
start a service/daemon using init.d-script with user != root in a correct way.
One solution is using su/sudo - but is that "clean"?
That depends on your reason for not being root to start. Sudo is good if you want to avoid giving the root password to the person in question, or if you want to restrict the commands they can run.
Am 04.04.2010 18:10, schrieb Timothy Kesten:
Am Sonntag, 4. April 2010 17:37:02 schrieb Kwan Lowe:
There's no real equivalent, but the "service" command is the main method of starting/stopping processes/daemons. In itself it doesn't do what the start-stop-daemon does, but the scripts associated with the service utility can be customized to mimic some similar functions.
My goal is:
start a service/daemon using init.d-script with user != root in a correct way.
One solution is using su/sudo - but is that "clean"?
Timothy
Check /etc/init.d/functions for the declared "deamon()" function and you will spot a correct and clean way to run a service as a user. daemon() can make use of the "runuser" command.
Alexander
Timothy Kesten wrote on Sun, 4 Apr 2010 17:13:17 +0200:
What is the CentOS-replacement for "start-stop-daemon"?
You are not looking for "service", are you?
Kai