Re: Dienste beobachten

From: Lars Engels <lars.engels(at)0x20.net>
Date: Tue, 25 Mar 2008 17:22:21 +0100

Quoting Lars Engels <lars.engels(at)0x20.net>:

> On Fri, Mar 21, 2008 at 11:40:37PM +0100, Bernd Walter wrote:
>> On Fri, Mar 21, 2008 at 07:39:47PM +0100, Lars Engels wrote:
>> > The init utility can also be used to keep arbitrary daemons
>> > running, automatically restarting them if they die. In this
>> case, the first
>> > field in the ttys(5) file must not reference the path to a configured
>> > device node and will be passed to the daemon as the final argument on its
>> > com- mand line. This is similar to the facility offered in the AT&T
>> > System V UNIX /etc/inittab.
>> >
>> > Weiß jemand, was ich falsch mache?
>>
>> Dein Programm wird sich nach dem Start sofort wieder beenden.
>> Vermutlich, weil es sich einmal wegfork'ed und nur das Kind überlebt.
>
> Das kann natürlich sein. Schade, dann werde ich mir etwas anderes
> überlegen müssen...
>

Ich habs jetzt schnell und schmutzig gemacht:

#!/bin/sh

while true; do
   ( pgrep -lf synergyc || ( synergyc localhost && xset r) ) > /dev/null
   sleep 0.5
done

-- 
Lars Engels
E-Mail: lars.engels(at)0x20.net

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Tue 25 Mar 2008 - 17:22:21 CET

search this site