From ceaf11adfae45fb187e7d744ac6e373c2cb70d28 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 21 Jul 2006 21:08:31 +0000 Subject: Only attempt kill if $helpers is defined --- etc/rc.newwanip | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc/rc.newwanip') diff --git a/etc/rc.newwanip b/etc/rc.newwanip index bf3e05f..d22cc22 100755 --- a/etc/rc.newwanip +++ b/etc/rc.newwanip @@ -51,7 +51,8 @@ if(file_exists("/tmp/rc.newwanip_oldip")) { $old_ip = file_get_contents("/tmp/rc.newwanip_oldip"); $helpers = exec("/bin/ps awux | grep \"{$old_ip}\" | grep -v \"grep\" | awk '{ print $6 }'"); - mwexec("kill " . trim($helpers)); + if($helpers) + mwexec("kill " . trim($helpers)); unlink("/tmp/rc.newwanip_oldip"); } -- cgit v1.1