From 5e36478d54db9e8179e976e94cfd7a8b06569aba Mon Sep 17 00:00:00 2001 From: Daniel Stefan Haischt Date: Fri, 21 Jul 2006 03:09:14 +0000 Subject: - added some extra checks to be able to detect whether a particular software is available. --- packages/dspam/pkg/dspam-pkgfunc.inc | 53 +++++++++++++++++++++++++++++++++++ packages/dspam/www/dspam-settings.php | 22 ++++++++++++--- 2 files changed, 71 insertions(+), 4 deletions(-) (limited to 'packages/dspam') diff --git a/packages/dspam/pkg/dspam-pkgfunc.inc b/packages/dspam/pkg/dspam-pkgfunc.inc index 9f02669e..0ea5ba85 100644 --- a/packages/dspam/pkg/dspam-pkgfunc.inc +++ b/packages/dspam/pkg/dspam-pkgfunc.inc @@ -490,4 +490,57 @@ function custom_php_deinstall_command() { conf_mount_ro(); } +function checkForLDAPSupport() { + $pd = popen("ldd /usr/local/bin/dspam", "r"); + while (!feof($pd)) { + $dspamstr .= fgets($pd, 4096); + } + pclose($pd); + + if (strpos($dspamstr, "libldap") !== false && + file_exists("/usr/local/lib/libldap.so") && + file_exists("/usr/local/lib/liblber.so")) { + return true; + } + + return false; +} + +function checkForPgSQLSupport() { + if (file_exists("/usr/local/lib/libpgsql_drv.so") && + file_exists("/usr/local/lib/libpq.so")) { + return true; + } + + return false; +} + +function checkForMySQLSupport() { + if (file_exists("/usr/local/lib/libmysql_drv.so") && + file_exists("/usr/local/lib/mysql/libmysqlclient.so")) { + return true; + } + + return false; +} + +function checkForSQLiteSupport() { + if (file_exists("/usr/local/lib/libsqlite3_drv.so") && + file_exists("/usr/local/lib/mysql/libsqlite3.so")) { + return true; + } + + return false; +} + +function checkForClamAVSupport() { + if (file_exists("/usr/local/bin/clamdscan") && + file_exists("/usr/local/bin/clamscan") && + file_exists("/usr/local/sbin/clamd")) { + return true; + } + + return false; +} + ?> diff --git a/packages/dspam/www/dspam-settings.php b/packages/dspam/www/dspam-settings.php index db7a4914..05662a6e 100644 --- a/packages/dspam/www/dspam-settings.php +++ b/packages/dspam/www/dspam-settings.php @@ -961,11 +961,15 @@ EOD;
  • DSPAM Privileges »last modified«'; ?>
  • DSPAM Debugging Options »last modified«'; ?>
  • DSPAM Engine Settings »last modified«'; ?>
  • +
  • LDAP Settings »last modified«'; ?>
  • +
  • Miscellaneous Settings »last modified«'; ?>
  • Maintainance Settings »last modified«'; ?>
  • System Settings »last modified«'; ?>
  • +
  • ClamAV Engine Settings »last modified«'; ?>
  • +
  • DSPAM Daemon Settings (Server) »last modified«'; ?>
  • DSPAM Daemon Settings (Client) »last modified«'; ?>
  • @@ -982,10 +986,16 @@ EOD; Storage Driver @@ -999,7 +1009,7 @@ EOD;

    - + @@ -1115,7 +1125,7 @@ EOD; - + @@ -1149,7 +1159,7 @@ EOD; - + @@ -2006,6 +2016,7 @@ markov Markovian Weighted Technique " onclick="document.iform.sectionid.value = 'eng';" /> +   @@ -2068,6 +2079,7 @@ markov Markovian Weighted Technique " onclick="document.iform.sectionid.value = 'ldap';" /> +   @@ -2552,6 +2564,7 @@ markov Markovian Weighted Technique   +  ClamAV Engine Settings @@ -2633,6 +2646,7 @@ markov Markovian Weighted Technique   +  DSPAM Daemon Settings (Server) @@ -2793,7 +2807,7 @@ markov Markovian Weighted Technique Server Parameters

    - + Parameters which will be passed to the LMTP server. -- cgit v1.2.3