# Server starter/restarter and crash checker for Jedi Knight:Jedi Academy script configurarion.

# Edit this file based on your server properties.
# Manual configuration is required or the script may not work correctly.
# Also, the configurations below are case sensitive, so watch out for what you type.

# DO NOT EDIT LINES WHICH CONTAINS "#" AT THE BEGINNING.

# Date code for autodownload.

versionc="19062010" # NEVER CHANGE THIS LINE OR AUTODOWNLOAD WILL BREAK.

# READ THIS CAREFULLY.
# I highly recommend changing the name of your server binary if the user where you are running has more than one JKA Server.
# Some of the checks are made in the process name, so, if several servers are running a linuxjampded at the same user for example, it will surely conflict and break the script.
# For users running a dedicated server via jamp.exe in the same Windows box and user where they play the game, i also recommend changing the name. 
# In this case, make a copy of jamp.exe, rename it to something like jamp2.exe and put it again in the GameData folder.
# You could also try this http://jediknight3.filefront.com/file/UNOFFICIAL_Patch_for_JA_101_Dedicated_Servers;41652.

# ************************************************************************************************** #

######################################################################################################
#                              General configuration. (MANDATORY)                                    #
######################################################################################################

# Your GameData folder where your binary jamp (jamp.exe or otherwise) is located. (DO NOT ADD A \ OR / AT THE END.)

dir="C:\Arquivos de programas\LucasArts\Star Wars Jedi Knight Jedi Academy\GameData"

# The name of your Windows username which will run the jamp process and the script.

user="roberto"

# Name of the jamp binary file.

process="jamp.exe"

# Game/MOD name for use with the jamp command line, +set fs_game.

game="MBII"

# Server's configurarion file for use with the jamp command line, +exec, and Dynamic Rotation.

cfg="server.cfg"

# Server's IP for use with the jamp command line, +set net_ip. 
# Leave it empty, unless your box has more than one IP.

ip=""

# Server's port for use with the jamp command line, +set net_port. 
# Change this if you plan on using a port other than the default 29070.

port="29070"

# Dynamic Rotation.
# Dynamic Rotation makes possible different rotations in each day of the week, to a total of seven, or each month, to a total of twelve.
# The rotation will be checked at script start and on intervals based in the script restart time. 
# When the script finds another day/month and the server is already running, the rotation will be set and the server killed for reinitialization.
# If enabled, the rotations must be added at drotation_day.cfg for daily rotations, or drotation_month.cfg for monthly rotations.
# 0 = Disabled, 1 = Enabled.

drotation="0"

# Time (in seconds) for the script to restart.
# Everything within the script will depend on this time. Crash checks, Dynamic Rotation checks, and the HTML server status page generator will be re-executed when the script restarts.
# Minimum time is 60 seconds to avoid overflow.

time="300"

# Type of UDP Status check. 
# 1 = Nmap without spoofing. Use this method for non local IPs (IP stored within a router, for example). 
# 2 = Nmap with local spoofing. Use this method for local IPs (Recommended for dynamic IPs, LAN, or WAN local IPs).
# 3 - Ncat. Alternative method if you can not use any of the Nmap check methods. No limitations. Low resources usage.

check="1"

# HTML server status page generator.
# The script will generate a html file including the server process status and miscellaneous info, and upload it to either a directory in the current machine or via ftp to a remote host.
# 0 = Disabled 1 = Enabled.

html="0"

######################################################################################################
#                                End of general configuration.                                       #
######################################################################################################

# ************************************************************************************************** #

######################################################################################################
#             Dynamic Rotation configuration. Required if Dynamic Rotation is enabled.               #
######################################################################################################

# Dynamic Rotation type.
# 1 = Daily 2 = Monthly.

drtype="1"

######################################################################################################
#                              End of Dynamic Rotation configuration.                                #
######################################################################################################

# ************************************************************************************************** #

######################################################################################################
#                 Nmap Configuration (LAN/WAN). Required for check methods 1 and 2.                  #
######################################################################################################

# JKA Server IP for Nmap only (LAN/WAN).

nip="200.179.40.131"

# JKA Server port for Nmap only.

nport="29070"

######################################################################################################
#                                    End of Nmap configurarion.                                      #
######################################################################################################

# ************************************************************************************************** #

######################################################################################################
#                  Nmap Local Spoof configuration. Required for check method 2.                      #
######################################################################################################

# You will need to type nmap -iflist first.
# Make sure to open cmd.exe and go to the folder where nmap.exe is located.
# Example of the nmap -iflist command:

# ************************INTERFACES************************
# DEV  (SHORT) IP/MASK         TYPE     UP MAC
# eth0 (eth0)  192.168.1.2/24  ethernet up 00:1E:8C:AD:09:75
# eth1 (eth1)  5.134.190.147/8 ethernet up 00:23:C3:86:BE:93
# lo0  (lo0)   127.0.0.1/8     loopback up

# In this case my device is eth0, and my local IP Range is 192.168.1.0 to 192.168.1.255 (mask /24).

# Device where your local IP is located.

device="eth0"

# Fake IP for local Spoofing. 
# You must use an available IP, or else it might conflict with another machine using this IP(Not required for local WAN IPs). 
# You also must use a local IP in range. 

ips="192.168.1.20"

######################################################################################################
#                             End of Nmap Local Spoof configuration.                                 #
######################################################################################################

# ************************************************************************************************** #

######################################################################################################
#                        Ncat Configuration. Required for check method 3.                            #
######################################################################################################

# JKA Server port for Ncat only.

ncport="29070"

######################################################################################################
#                                    End of Ncat configurarion.                                      #
######################################################################################################

# ************************************************************************************************** #

######################################################################################################
#        HTML Server status generator configuration. Required if html is set to 1. (Enabled)         #
######################################################################################################

# HTML file name and folder where it will be saved.
# If left without a path, file will be saved on your script folder.
# Obs: FTP will use this location to send the file.

htmlfile="C:\Arquivos de programas\Apache Software Foundation\Apache2.2\htdocs\jkaserverstatus.html"

# Name of your server to be displayed at the HTML status page.

htmlservername="Server name"

# Server's IP:Port to be displayed at the HTML status page.

htmlserveraddress="200.179.40.131:29070"

# Display your Dynamic Rotation for the day/month at the HTML status page.
# This feature will only work if Dynamic Rotation is enabled.
# 0 = Disabled 1 = Enabled.

htmlshowdrotation="1"

# Display your start/restart log at the HTML status page.
# This feature will only work if a log file has been set.
# 0 = Disabled 1 = Enabled.

displaystartlog="1"

# Display your crash log at the HTML status page.
# This feature will only work if a log file has been set.
# 0 = Disabled 1 = Enabled.

displaycrashlog="1"

# FTP OPTIONS.
# Allows you to upload the HTML status page to a remote host via ftp.
# 0 = Disabled 1 = Enabled.

useftp="0"

# FTP Server HOST/IP Address.

ftphost="192.168.1.3"

# Username for the ftp account.

ftpuser="mx"

# Password for the user ftp account.

ftppassword="123example"

# Remote location for the HTML file.
# If left without a directory, file will be uploaded on the user home folder.

rhtmlfile="/home/mx/public_html/jkaserverstatus.html"

######################################################################################################
#                       End of HTML Server status generator configuration.                           #
######################################################################################################

# ************************************************************************************************** #

######################################################################################################
#                                        Log configurarion.                                          #
######################################################################################################

# Log file for server start/restart.
# If left empty, log will not be recorded.
# If left without a directory path, log will be saved on the script folder.

lognormal="lognormal.txt"

# Log file for unfinalized process crashes.
# If left empty, log will not be recorded.
# If left without a directory path, log will be saved on the script folder.

logcrash="logcrash.txt"

# Log file for the jamp process.
# All console messages will be logged.
# This feature will only work with jampDed.exe. 
# Jamp.exe uses a GUI interface, thus making it impossible to log the stdout/stderr.
# If left empty, log will not be recorded.
# If left without a directory path, log will be saved on the jamp binary folder.

logserver="logserver.txt"

######################################################################################################
#                                      End of log configurarion.                                     #
######################################################################################################

# ************************************************************************************************** #

######################################################################################################
#                                    Updater Configurarion.                                          #
######################################################################################################

# Autodownload for updating the script files and downloading required files. 
# Autodownload will happen when you execute Updater.bat.
# If autodownload is disabled it will show the mirror(s) for the full version instead.
# 0 = Disabled, 1 = Enabled.

autodownload="1"

# CGI script path.
# If you are using the CGI script in your server, make sure to set the correct path for it here.
# The updater will use this path to update the CGI script.
# If left empty, the script will check the cgi script on your script/cgi-bin folder.

cgipath="C:\Arquivos de programas\Apache Software Foundation\Apache2.2\cgi-bin\jkascript.cgi"

######################################################################################################
#                                   End of updater configurarion.                                    #
######################################################################################################

# ************************************************************************************************** #