Skip to content
class.ISPConfigDebianOS.inc.php 32.1 KiB
Newer Older
		if(!$ispc_config || !isset($ispc_config['server_id']) || !$ispc_config['server_id']) {
			throw new ISPConfigOSException('Could not read ISPConfig settings file.');
		}
		$server_id = $ispc_config['server_id'];
		
		foreach($php_versions as $curver) {
			$qry = 'INSERT IGNORE INTO `dbispconfig`.`server_php` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `client_id`, `name`, `php_fastcgi_binary`, `php_fastcgi_ini_dir`, `php_fpm_init_script`, `php_fpm_ini_dir`, `php_fpm_pool_dir`, `active`) VALUES (1, 1, \'riud\', \'riud\', \'\', ' . intval($server_id) . ', 0, \'PHP ' . $curver . '\', \'/usr/bin/php-cgi' . $curver . '\', \'/etc/php/' . $curver . '/cgi/php.ini\', \'/etc/init.d/php' . $curver . '-fpm\', \'/etc/php/' . $curver . '/fpm/php.ini\', \'/etc/php/' . $curver . '/fpm/pool.d\', \'y\')';			  $cmd = 'mysql --defaults-file=/etc/mysql/debian.cnf -e ' . escapeshellarg($qry);
			if(!$dry_run) {
				$result = $this->exec($cmd);
				if($result === false) {
					throw new ISPConfigOSException('Command ' . $cmd . ' failed.');
				}
			}
		}
		
		$this->restartService('clamav-daemon');
		
Marius Burkard's avatar
Marius Burkard committed
		ISPConfigLog::info('Checking all services are running.', true);
		$check_services = array(
			'apache2',
			'mysql',
			'rspamd',
			'clamav-daemon',
			'pureftpd',
			'postfix',
			'dovecot',
			'bind9',
			'redis-server'
		);
		foreach($check_services as $service) {
			$status = $this->isServiceRunning($service);
			ISPConfigLog::info($service . ' :' . ($status ? 'OK' : 'FAILED'), true);
			if(!$status) {
				ISPConfigLog::warn($service . ' seems not to be running!', true);
			}
		}
			
		
		ISPConfigLog::info('Installation ready.', true);
		
Marius Burkard's avatar
Marius Burkard committed
		ISPConfigLog::info('Your ISPConfig admin password is: ' . $ispconfig_admin_pw, true);
		ISPConfigLog::info('Your MySQL root password is: ' . $mysql_root_pw, true);