Skip to content

Commit

Permalink
update server default config
Browse files Browse the repository at this point in the history
  • Loading branch information
mcencini committed Oct 31, 2024
1 parent bc570c9 commit 760390c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pulserver/_server/_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@
HOME_DIR = pathlib.Path.home()

# Define the default config file location
DEFAULT_CONFIG_PATH = os.path.join(HOME_DIR, "pulserver_config.ini")
DEFAULT_CONFIG_PATH = os.path.join(HOME_DIR, ".pulserver_config.ini")
DEFAULT_LOGDIR = os.path.join(HOME_DIR, "pulserver_log")
DEFAULT_PLUGINDIR = os.path.join(HOME_DIR, "pulserver_plugins")

# Default configuration values
DEFAULT_CONFIG = {
"SCANNER_ADDRESS": "127.0.0.1",
"SCANNER_PORT": 5000,
"RECON_SEVER_ADDRESS": None,
"RECON_SEVER_PORT": None,
"PLUGINSDIR": None,
"PLUGINSDIR": DEFAULT_PLUGINDIR,
"LOGDIR": DEFAULT_LOGDIR,
}

Expand Down Expand Up @@ -124,7 +125,7 @@ def _get_plugin_dir(config):

# Add custom design functions
CUSTOM_PLUGINS = config["PLUGINSDIR"]
if CUSTOM_PLUGINS:
if CUSTOM_PLUGINS and os.path.exists(CUSTOM_PLUGINS):
PLUGIN_DIR.append(os.path.realpath(CUSTOM_PLUGINS))

return PLUGIN_DIR
Expand Down

0 comments on commit 760390c

Please sign in to comment.