Ejemplo n.º 1
0
if ($rc === false) {
    echo "[ERROR] Error while exporting Postfix configuration.\n";
    exit(9);
}
// Reload Postfix
if (Config::read('postfix') === 'enabled') {
    $feature->reload();
}
// Dovecot setup
$feature = new Dovecot();
$rc = $feature->exportConfiguration($db);
if ($rc === false) {
    echo "[ERROR] Error while exporting Dovecot configuration.\n";
    exit(9);
}
// Reload Dovecot
if (Config::read('dovecot') === 'enabled') {
    $feature->reload();
}
// Apache setup
$feature = new Apache();
$rc = $feature->exportConfiguration($db);
if ($rc === false) {
    echo "[ERROR] Error while exporting Apache configuration.\n";
    exit(9);
}
// Reload Apache
if (Config::read('apache') === 'enabled') {
    $feature->reload();
}
exit;
Ejemplo n.º 2
0
 /**
  * Disable and stop the httpd service
  * @return void
  */
 function disable()
 {
     Log::debug('Disabling feature: apache');
     // Find Roundcube configuration for Apache and delete it
     $cfgFile = Config::read('apache|directoryConfD') . '/roundcubemail.conf';
     if (is_file($cfgFile)) {
         unlink($cfgFile);
     }
     // Reload Apache, if enabled
     if (Config::read('apache') === 'enabled') {
         $feature = new Apache();
         $feature->reload();
     }
 }