From 167bcf84f2f6fd499deb76b6977a257e1157f2f2 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 19 Feb 2005 00:05:29 +0000 Subject: [PATCH] Add get_pfsync_interface_status($pfsyncinterface): returns the status of a pfsync --- etc/inc/pfsense-utils.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index d11db25a89..6e5e321d7f 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -149,6 +149,14 @@ function get_carp_interface_status($carpinterface) { return $status; } +/* + * get_pfsync_interface_status($pfsyncinterface): returns the status of a pfsync + */ +function get_pfsync_interface_status($pfsyncinterface) { + $status = exec_command("/sbin/ifconfig {$pfsyncinterface} | grep \"pfsync:\" | cut -d\" \" -f5"); + return $status; +} + /* * find_carp_interface($ip): return the carp interface where an ip is defined */