示例#1
0
function EasySCP_ProFTPd_configuration_file()
{
    //TODO Übernahme der Daten aus der Setup config.xml (FTP user und Pass) implementieren
    //$xml = simplexml_load_file(DaemonConfig::$cfg->{'ROOT_DIR'} . '/../setup/config.xml');
    $CreateProFTPdPass = DaemonConfigFTP::CreateProFTPdPass();
    if ($CreateProFTPdPass !== true) {
        return $CreateProFTPdPass;
    }
    $SaveProFTPdConfig = DaemonConfigFTP::SaveProFTPdConfig();
    if ($SaveProFTPdConfig !== true) {
        return $SaveProFTPdConfig;
    }
    return 'Ok';
}
示例#2
0
 /**
  * @param string $config
  * @return mixed
  */
 public static function rebuildConfigPass($config = 'system')
 {
     System_Daemon::debug('Starting "DaemonConfigCommon::rebuildConfigPass" subprocess.');
     switch ($config) {
         case 'DNS':
             System_Daemon::debug('Starting "DNS" subprocess.');
             $SavePDNSConfig = DaemonConfigDNS::SavePDNSConfig();
             if ($SavePDNSConfig !== true) {
                 return $SavePDNSConfig;
             }
             System_Daemon::debug('Finished "DNS" subprocess.');
             break;
         case 'FTP':
             System_Daemon::debug('Starting "FTP" subprocess.');
             $SaveProFTPdConfig = DaemonConfigFTP::SaveProFTPdConfig();
             if ($SaveProFTPdConfig !== true) {
                 return $SaveProFTPdConfig;
             }
             System_Daemon::debug('Finished "FTP" subprocess.');
             break;
         case 'MTA':
             System_Daemon::debug('Starting "MTA" subprocess.');
             $SaveMTAConfig = DaemonConfigMail::SaveMTAConfig();
             if ($SaveMTAConfig !== true) {
                 return $SaveMTAConfig;
             }
             System_Daemon::debug('Finished "MTA" subprocess.');
             break;
         case 'PMA':
             System_Daemon::debug('Starting "PMA" subprocess.');
             DaemonConfigTools::SavePMAConfig();
             System_Daemon::debug('Finished "PMA" subprocess.');
             break;
         case 'RC':
             System_Daemon::debug('Starting "RC" subprocess.');
             DaemonConfigTools::SaveRCConfig();
             System_Daemon::debug('Finished "RC" subprocess.');
             break;
         case 'system':
             System_Daemon::debug('Starting "system" subprocess.');
             $SavePDNSConfig = DaemonConfigDNS::SavePDNSConfig();
             if ($SavePDNSConfig !== true) {
                 return $SavePDNSConfig;
             }
             $SaveProFTPdConfig = DaemonConfigFTP::SaveProFTPdConfig();
             if ($SaveProFTPdConfig !== true) {
                 return $SaveProFTPdConfig;
             }
             $SaveMTAConfig = DaemonConfigMail::SaveMTAConfig();
             if ($SaveMTAConfig !== true) {
                 return $SaveMTAConfig;
             }
             System_Daemon::debug('Finished "system" subprocess.');
             break;
         default:
             System_Daemon::warning("Don't know what to do with " . $config);
             return false;
     }
     System_Daemon::debug('Finished "DaemonConfigCommon::rebuildConfigPass" subprocess.');
     return true;
 }