readme-wiki
xorrior 2017-12-29 12:47:11 -05:00
parent 1781f20856
commit fd712c3551
1 changed files with 3 additions and 12 deletions

View File

@ -29,18 +29,9 @@ if STAGING_KEY == "BLANK":
elif STAGING_KEY == "RANDOM": elif STAGING_KEY == "RANDOM":
STAGING_KEY = ''.join(random.sample(string.ascii_letters + string.digits + punctuation, 32)) STAGING_KEY = ''.join(random.sample(string.ascii_letters + string.digits + punctuation, 32))
# the installation path for Empire, defaults to auto-calculating it # Calculate the install path. We know the project directory will always be the parent of the current directory. Any modifications of the folder structure will
# set manually if issues arise # need to be applied here.
currentPath = os.path.dirname(os.path.realpath(__file__)) INSTALL_PATH = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
empireIndex = currentPath.rfind("Empire")
if empireIndex < 0:
empireIndex = currentPath.rfind("empire")
if empireIndex < 0:
INSTALL_PATH = "/".join(os.getcwd().split("/")[0:-1])+"/"
else:
endIndex = currentPath.find("/", empireIndex)
endIndex = None if endIndex < 0 else endIndex
INSTALL_PATH = currentPath[0:endIndex] + "/"
# an IP white list to ONLY accept clients from # an IP white list to ONLY accept clients from
# format is "192.168.1.1,192.168.1.10-192.168.1.100,10.0.0.0/8" # format is "192.168.1.1,192.168.1.10-192.168.1.100,10.0.0.0/8"