From dbe7a7f25fb3ca9880adf7e9df5c0e6a9d67dcb2 Mon Sep 17 00:00:00 2001 From: thompsa Date: Fri, 12 Mar 2010 16:06:44 +1300 Subject: Only install the cron entry if we are monitoring carp. --- config/haproxy-dev/haproxy.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/haproxy-dev/haproxy.inc b/config/haproxy-dev/haproxy.inc index 61cc71e6..eff614ec 100644 --- a/config/haproxy-dev/haproxy.inc +++ b/config/haproxy-dev/haproxy.inc @@ -65,7 +65,6 @@ function haproxy_custom_php_deinstall_command() { exec("rm /usr/local/etc/rc.d/haproxy.sh"); exec("rm /etc/devd/haproxy.conf"); exec("/etc/rc.d/devd restart"); - haproxy_install_cron(false); } function haproxy_custom_php_install_command() { @@ -156,7 +155,6 @@ EOD; fclose($fd); exec("/etc/rc.d/devd restart"); - haproxy_install_cron(true); conf_mount_ro(); exec("/usr/local/etc/rc.d/haproxy.sh start"); @@ -536,6 +534,11 @@ function haproxy_writeconf() { // create config file fclose($fd); + if (isset($a_global['carpdev'])) + haproxy_install_cron(true); + else + haproxy_install_cron(false); + $freebsd_version = substr(trim(`uname -r`), 0, 1); if(!file_exists("/usr/bin/limits")) { exec("fetch -q -o /usr/bin/limits http://files.pfsense.org/extras/{$freebsd_version}/limits"); -- cgit v1.2.3