a few fixes

This commit is contained in:
SJ
2014-04-24 10:18:29 +02:00
parent 4e6946feca
commit 989cd68054
4 changed files with 65 additions and 10 deletions

View File

@ -192,6 +192,7 @@ $config['SPHINX_TAG_INDEX'] = 'tag1';
$config['SPHINX_NOTE_INDEX'] = 'note1';
$config['RELOAD_COMMAND'] = 'sudo -n /etc/init.d/rc.piler reload';
$config['PILERIMPORT_IMAP_COMMAND'] = '/usr/local/bin/pilerimport -d /var/piler/imap -q -r';
$config['LDAP_IMPORT_CONFIG_FILE'] = '/usr/local/etc/ldap-import.cfg';

View File

@ -129,6 +129,8 @@ class ModelGoogleGoogle extends Model {
}
}
if($count > 0) { $this->run_import_command(); }
return $count;
}
@ -158,6 +160,13 @@ class ModelGoogleGoogle extends Model {
}
private function run_import_command() {
syslog(LOG_INFO, "importing emails ...");
system(PILERIMPORT_IMAP_COMMAND, $val);
syslog(LOG_INFO, "importing emails done");
}
}
?>