diff options
author | Marcello Coutinho <marcellocoutinho@gmail.com> | 2012-05-03 19:30:17 -0300 |
---|---|---|
committer | marcelloc <marcellocoutinho@gmail.com> | 2012-05-03 19:30:17 -0300 |
commit | a06400b906893ccace83e11cf5bb76e431557b24 (patch) | |
tree | 6b0aa7422cc637c1048b028557799e51d023417e | |
parent | 08e2b2389dd192eaacc637fbbb97aa287de8ad0f (diff) | |
download | pfsense-packages-a06400b906893ccace83e11cf5bb76e431557b24.tar.gz pfsense-packages-a06400b906893ccace83e11cf5bb76e431557b24.tar.bz2 pfsense-packages-a06400b906893ccace83e11cf5bb76e431557b24.zip |
postfix - reduce boot process and include startup check
-rwxr-xr-x | config/dansguardian/dansguardian.inc | 8 | ||||
-rwxr-xr-x | config/dansguardian/dansguardian_groups.xml | 2 | ||||
-rw-r--r-- | config/postfix/postfix.inc | 21 | ||||
-rw-r--r-- | pkg_config.8.xml | 2 | ||||
-rw-r--r-- | pkg_config.8.xml.amd64 | 2 |
5 files changed, 30 insertions, 5 deletions
diff --git a/config/dansguardian/dansguardian.inc b/config/dansguardian/dansguardian.inc index 26e213a2..0712324e 100755 --- a/config/dansguardian/dansguardian.inc +++ b/config/dansguardian/dansguardian.inc @@ -32,6 +32,9 @@ require_once("util.inc"); require("globals.inc"); #require("guiconfig.inc"); +$uname=posix_uname(); +if ($uname['machine']=='amd64') + ini_set('memory_limit', '250M'); function dg_text_area_decode($text){ return preg_replace('/\r\n/', "\n",base64_decode($text)); @@ -92,6 +95,9 @@ function sync_package_dansguardian() { $boot_process="on"; } + if (is_process_running('dansguardian') && isset($boot_process)) + return; + #assign xml arrays if (!is_array($config['installedpackages']['dansguardian'])) $config['installedpackages']['dansguardian']['config'][0]=array('interface'=>'lo0', @@ -687,7 +693,7 @@ function sync_package_dansguardian() { 'group_options' => "scancleancache,infectionbypasserrorsonly", 'reportinglevel'=>'3', 'mode'=> "1", - 'report_level'=>"general"); + 'report_level'=>"global"); $groups=array("scancleancache","hexdecodecontent","blockdownloads","enablepics","deepurlanalysis","infectionbypasserrorsonly","disablecontentscan","sslcertcheck","sslmitm"); #loop on array diff --git a/config/dansguardian/dansguardian_groups.xml b/config/dansguardian/dansguardian_groups.xml index 063d55fa..96429567 100755 --- a/config/dansguardian/dansguardian_groups.xml +++ b/config/dansguardian/dansguardian_groups.xml @@ -250,7 +250,7 @@ If defined, this overrides the global setting in dansguardian.conf for members of this filter group.]]></description> <type>select</type> <options> - <option><name>Use General log option selected on Report and log - recommended</name><value>Global</value></option> + <option><name>Use General log option selected on Report and log - recommended</name><value>global</value></option> <option><name>Use HTML template file (accessdeniedaddress ignored)</name><value>3</value></option> <option><name>Report fully</name><value>2</value></option> <option><name>Report why but not what denied phrase</name><value>1</value></option> diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc index f76b523a..d92e380f 100644 --- a/config/postfix/postfix.inc +++ b/config/postfix/postfix.inc @@ -34,6 +34,10 @@ require_once("functions.inc"); require_once("pkg-utils.inc"); require_once("globals.inc"); +$uname=posix_uname(); +if ($uname['machine']=='amd64') + ini_set('memory_limit', '250M'); + function px_text_area_decode($text){ return preg_replace('/\r\n/', "\n",base64_decode($text)); } @@ -268,6 +272,17 @@ function check_cron(){ function sync_package_postfix() { global $config; + # detect boot process + if (is_array($_POST)){ + if (preg_match("/\w+/",$_POST['__csrf_magic'])) + unset($boot_process); + else + $boot_process="on"; + } + + if(is_process_running("master") && isset($boot_process)) + return; + #check patch in /etc/inc/config. $relay_domains = ""; $transport = ""; @@ -678,7 +693,11 @@ MASTEREOF2; touch("/etc/mail/aliases"); exec("/usr/local/bin/newaliases"); postfix_start(); - postfix_sync_on_changes(); + + #Do not sync during boot + if(!isset($boot_process)) + postfix_sync_on_changes(); + } function postfix_start(){ global $config; diff --git a/pkg_config.8.xml b/pkg_config.8.xml index 26d07320..93ecebc3 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -427,7 +427,7 @@ <pkginfolink>http://forum.pfsense.org/index.php/topic,40622.0.html</pkginfolink> <depends_on_package_base_url>http://files.pfsense.org/packages/8/All/</depends_on_package_base_url> <depends_on_package>postfix-2.8.7,1.tbz</depends_on_package> - <version>2.8.7,1 pkg v.2.3.3_1</version> + <version>2.8.7,1 pkg v.2.3.4</version> <status>RC1</status> <required_version>2.0</required_version> <configurationfile>postfix.xml</configurationfile> diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index 17456ae1..db7fdabe 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -510,7 +510,7 @@ <depends_on_package>postfix-2.8.7,1.tbz</depends_on_package> <depends_on_package>perl-5.12.4_3.tbz</depends_on_package> <depends_on_package_pbi>postfix-2.8.5-amd64.pbi</depends_on_package_pbi> - <version>2.8.7,1 pkg v.2.3.3_1</version> + <version>2.8.7,1 pkg v.2.3.4</version> <status>RC1</status> <required_version>2.0</required_version> <configurationfile>postfix.xml</configurationfile> |