getpid.sh: use /bin/pidof when available
This commit is contained in:
parent
aad92ceafe
commit
e3a2a6c44d
|
@ -1,10 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# ngIRCd Test Suite
|
# ngIRCd Test Suite
|
||||||
# $Id: getpid.sh,v 1.5 2006/08/05 00:15:28 alex Exp $
|
|
||||||
|
|
||||||
# did we get a name?
|
# did we get a name?
|
||||||
[ $# -ne 1 ] && exit 1
|
[ $# -ne 1 ] && exit 1
|
||||||
|
|
||||||
|
[ -x /bin/pidof ] && exec /bin/pidof -s $@
|
||||||
|
|
||||||
# detect flags for "ps" and "head"
|
# detect flags for "ps" and "head"
|
||||||
UNAME=`uname`
|
UNAME=`uname`
|
||||||
if [ $UNAME = "FreeBSD" ]; then
|
if [ $UNAME = "FreeBSD" ]; then
|
||||||
|
|
Loading…
Reference in New Issue