aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-11-03 10:03:15 -0200
committerRenato Botelho <renato@netgate.com>2015-11-03 10:03:15 -0200
commitadcb192ab730181f5c5f59540606cde26b849ba3 (patch)
treee72b7aa445c296847fab744e5bf331f5f665b9f6
parent55f02c3e35bb5e00625550ae66af3b645ca798ba (diff)
parente9883d874cac1d8c8a425a55891fb314ae983beb (diff)
downloadpfsense-packages-adcb192ab730181f5c5f59540606cde26b849ba3.tar.gz
pfsense-packages-adcb192ab730181f5c5f59540606cde26b849ba3.tar.bz2
pfsense-packages-adcb192ab730181f5c5f59540606cde26b849ba3.zip
Merge pull request #1129 from doktornotor/patch-13
-rw-r--r--config/spamd/spamd.inc43
1 files changed, 0 insertions, 43 deletions
diff --git a/config/spamd/spamd.inc b/config/spamd/spamd.inc
index 548a2934..13edb7ce 100644
--- a/config/spamd/spamd.inc
+++ b/config/spamd/spamd.inc
@@ -299,49 +299,6 @@ function remove_spaces($string) {
return $string;
}
-function sync_spamd_config_to_backup() {
- global $config;
- if (is_array($config['installedpackages']['carpsettings']['config'])) {
- foreach ($config['installedpackages']['carpsettings']['config'] as $carp) {
- if ($carp['synchronizetoip'] != "") {
- $synctoip = $carp['synchronizetoip'];
- $password = $carp['password'];
- if ($config['system']['username']) {
- $username = $config['system']['username'];
- } else {
- $username = "admin";
- }
- }
- }
- }
- if ($synctoip and $password) {
- if ($config['system']['webgui']['protocol'] != "") {
- $synchronizetoip = $config['system']['webgui']['protocol'];
- $synchronizetoip .= "://";
- }
- $port = $config['system']['webgui']['port'];
- /* if port is empty lets rely on the protocol selection */
- if ($port == "") {
- if ($config['system']['webgui']['protocol'] == "http") {
- $port = "80";
- } else {
- $port = "443";
- }
- }
- $params = array(XML_RPC_encode($password),XML_RPC_encode($xml));
- /* create files to sync array */
- $filetosync = array("/var/db/spamd", "/var/db/whitelist.txt");
- /* loop through files to sync list and sync them up */
- foreach ($filetosync as $f2s) {
- $f2c_contents = file_get_contents($f2s);
- xmlrpc_sync_file($url, $password, $f2s, $f2c_contents, $port);
- }
- /* signal remote process config reload */
- xmlrpc_exec_shell($url, $password, "/usr/bin/killall -HUP spamlogd", $port);
- xmlrpc_exec_shell($url, $password, "/usr/bin/killall -HUP spamd", $port);
- }
-}
-
function custom_php_install_command() {
global $config;
system("touch /var/db/whitelist.txt");