http://www.openbsd.org/faq/pf/logging.html#syslog

Okan Demirmen <[email protected]>
Newsgroups gmane.os.openbsd.www
Message-ID <[email protected]>
hi -

noting that pid files are not to be completely trusted, wouldn't
replacing the kill(1)/cat(1) bits in the example scripts/commands with
pkill(1) be more accurate?

(i suppose limiting with -U may also be opt'd for too...)

if this is of any use, i can go replace the other instances of these as
well (e.g. faq's 6 and 10)

not really a bug, so i'm just sending to www@ - please redirect me as
appropriate ;)

okan

Index: faq/pf/logging.html
===================================================================
RCS file: /cvs/www/faq/pf/logging.html,v
retrieving revision 1.26
diff -u -r1.26 logging.html
--- faq/pf/logging.html	1 May 2006 00:54:29 -0000	1.26
+++ faq/pf/logging.html	9 May 2006 14:28:32 -0000
@@ -256,11 +256,11 @@
 <pre>
 	#!/bin/sh
 	FILE=/home/pflogger/pflog5min.$(date "+%Y%m%d%H%M")
-	kill -ALRM $(cat /var/run/pflogd.pid)
+	pkill -ALRM pflogd
 	if [ $(ls -l /var/log/pflog | cut -d " " -f 8) -gt 24 ]; then
 	   mv /var/log/pflog $FILE
 	   chown pflogger $FILE
-	   kill -HUP $(cat /var/run/pflogd.pid)
+	   pkill -HUP pflogd
 	fi
 </pre>
 
@@ -349,7 +349,7 @@
 Make syslogd notice the changes by restarting it:
 <blockquote>
 <tt>
-# kill -HUP $(cat /var/run/syslog.pid)
+# pkill -HUP syslogd
 </tt>
 </blockquote>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.