Настройка L2EmuProject на FreeBSD - Форум администраторов игровых серверов
Форум администраторов игровых серверов StormWall - Защита от DDos атак
Непрочитано 17.12.2009, 19:13   #1
Пользователь

Автор темы (Топик Стартер) Настройка L2EmuProject на FreeBSD

#./L2Server.sh
или
#sudo ./L2Server.sh
Ведет к такой ошибке
Код:
===========================================================================================================================-[ L2GameServer ]
17 Dec 17:59:31: [INFO] L2EmuProject-Game servers should not run under root-account ... exited.
от wheel юзера сервер не стартует (пользуюсь screen) и не открываются сокеты без скрина.
panaceya вне форума Ответить с цитированием
Непрочитано 20.12.2009, 13:38   #2
Пользователь

Автор темы (Топик Стартер) Re: Настройка L2EmuProject на FreeBSD

решил траблой отключением проверки на рута
исправил в папке L2EmuProject-Game/src/main/java/com/l2emu/gameserver/util файл BootManager.java
Верный файл http://depositfiles.com/files/55mvn5hk4
Содержимое файла:
Код:
/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
 // Panaceya вылечил проверку от рута ICQ:  435-441
package com.l2emu.gameserver.util;

import java.io.File;
import java.io.IOException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.l2emu.Config;
import com.l2emu.gameserver.L2GameServer;
import com.l2emu.status.Status;
import com.l2emu.tools.Tools;
import com.l2emu.tools.config.L2Config;
import com.l2emu.tools.logging.L2Log;
import com.l2emu.tools.versionning.Version;

/**
 * @author Rayan
 */
public final class BootManager
{
	private final static Log _log = LogFactory.getLog(BootManager.class);
		
	// Release
	private static final String STABLE_RELEASE = "1.0.6";
	
	// Versionning
	private static final Version _gameVersion = new Version("l2emuproject-game-" + STABLE_RELEASE + ".jar");
	private static final Version _commonsVersion = new Version("l2emuproject-commons-" + STABLE_RELEASE + ".jar");

	/**
	 * Calls Boot Preparator.
	 * 
	 * @param args
	 * @throws Throwable
	 */
	public static void main(String[] args) throws Throwable
	{
		new BootManager();
	}

	public BootManager() throws Throwable
	{
		Tools.printSection("Boot Manager");
		_log.info("BootManager: Initializing Boot Manager.");
		
		// create all needed files and dirs
		// --------------------------------
		_log.info("BootManager: Creating Boot Folders and Files.");
		createBootDirs();
		
		// inits versionning
		// ------------
		_log.info("BootManager: Initalizing Versionning.");
		initVersionning();
		
		// inits logging
		// ------------
		_log.info("BootManager: Initializing Logging.");
		L2Log.initLogging();
		
		// reads Config b4 init gameserver boot
		// --------------------------------------------
		_log.info("BootManager: Initializing Configs.");
		Config.loadAll();
		
		// need to re print config just loaded.
		// ------------------------------------
		Tools.printSection("Boot Manager");
		_log.info("BootManager: Config Sucessffully Loaded.");
		
		// Init telnet
		Tools.printSection("Telnet");
		loadTelnet();
		//StartGameServer 
               // Вот тут была бяка
		Tools.printSection("L2GameServer");
		_log.info("BootManager: Preparations Done. Staring GameServer!");
              
		new L2GameServer();
	}

	private void loadTelnet() throws Exception
	{
		if (L2Config.IS_TELNET_ENABLED)
			new Status().start();
		else
			_log.info("Telnet Server is currently disabled.");
	}

	private void createBootDirs()
	{
		// Create logging Directories
		// -----------------------------
		new File("log").mkdirs();
		new File("log/java").mkdirs();
		new File("log/error").mkdirs();
		new File("log/audit").mkdirs();
		new File("log/chat").mkdirs();
		new File("log/item").mkdirs();
		new File("log/enchant").mkdirs();
		new File("log/olympiad").mkdirs();
		new File("log/game").mkdirs();
		new File("log/GMAudit").mkdirs();
		new File("log/admin-commands").mkdirs();
		// temp fix
		new File(Config.DATAPACK_ROOT, "data/crests").mkdirs();
		new File("./config/versionning").mkdirs();
		_log.info("BootManager: All Directories and Files Created!");
	}
	
	private void initVersionning() throws IOException
	{
		File buildGameFile = new File("./config/versionning/game-version.xml");
		File buildCommonsFile = new File("./config/versionning/commons-version.xml");
		
		// Delete if exists.
		// -----------------------------
		if (buildGameFile.exists())
			buildGameFile.delete();
		
		// Delete if exists.
		// -----------------------------
		if (buildCommonsFile.exists())
			buildCommonsFile.delete();
		
		// Create version files.
		// -----------------------------
		buildGameFile.createNewFile();
		buildCommonsFile.createNewFile();
		_gameVersion.transferInfo("l2emuproject-game-" + STABLE_RELEASE + ".jar", "L2Server", buildGameFile);
		_commonsVersion.transferInfo("l2emuproject-commons-" + STABLE_RELEASE + ".jar", "L2Server", buildCommonsFile);
	}
}
При правильной настройке от рута запускать можно! Но не советую незнающим это делать.
panaceya вне форума Ответить с цитированием
Ответ


Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 
Опции темы

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход


© 2007–2024 «Форум администраторов игровых серверов»
Защита сайта от DDoS атак — StormWall
Работает на Булке неизвестной версии с переводом от zCarot
Текущее время: 14:30. Часовой пояс GMT +3.

Вверх