>From dff4d7b21d8e6c34716eeaac10dadfa4ddee8f6c Mon Sep 17 00:00:00 2001 From: Dan Kenigsberg Date: Wed, 16 Sep 2009 15:28:58 +0300 Subject: [PATCH] damonize ksmtuned and create pidfile --- TODO | 3 --- ksmtuned | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/TODO b/TODO index 0906417..32c3b39 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,2 @@ - More docs in ksmtuned.conf - - - ksmtuned needs to daemonize, currently "service ksmtuned start" - just hangs diff --git a/ksmtuned b/ksmtuned index 5bdc4a3..f97fa6d 100644 --- a/ksmtuned +++ b/ksmtuned @@ -113,4 +113,8 @@ loop () { done } -loop +PIDFILE=${PIDFILE-/var/run/ksmtune.pid} +if touch "$PIDFILE"; then + loop & + echo $! > "$PIDFILE" +fi -- 1.6.2.5