From 233d423debfe6c221b786e3b945b855575249d34 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 3 Aug 2012 00:00:33 -0700 Subject: [PATCH] Grmbl, old OSX versions didn't ship with pgrep(1). --- .../DNSCrypt/extra/usr/scripts/stop-dnscrypt-proxy.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/stop-dnscrypt-proxy.sh b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/stop-dnscrypt-proxy.sh index 211e631..1f549d4 100755 --- a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/stop-dnscrypt-proxy.sh +++ b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/stop-dnscrypt-proxy.sh @@ -2,7 +2,9 @@ . ./common.inc -pgrep -x dnscrypt-proxy | egrep '[0-9]+' > /dev/null || exit 0 +if [ -x /usr/bin/pgrep ]; then + pgrep -x dnscrypt-proxy | egrep '[0-9]+' > /dev/null || exit 0 +fi [ ! -r "$PROXY_PID_FILE" ] && exit 0 pid=$(cat "$PROXY_PID_FILE") [ $pid -lt 2 ] && exit 0