mirror of
https://github.com/TheCommsChannel/TC2-APRS-BBS.git
synced 2025-06-28 07:47:26 -04:00
Add files via upload
This commit is contained in:
commit
635e7f42d2
9 changed files with 2399 additions and 0 deletions
26
config.py
Normal file
26
config.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
import os
|
||||
from configparser import ConfigParser
|
||||
|
||||
config_file = "config.ini"
|
||||
config = ConfigParser()
|
||||
|
||||
# Check if config.ini exists and create one if it doesnt.
|
||||
if not os.path.exists(config_file):
|
||||
with open(config_file, "w") as file:
|
||||
file.write("""
|
||||
[DEFAULT]
|
||||
MYCALL = BBS
|
||||
KISS_HOST = 192.168.1.94
|
||||
KISS_PORT = 8001
|
||||
BULLETIN_EXPIRATION_DAYS = 7
|
||||
APRS_PATH = WIDE1-1
|
||||
""")
|
||||
|
||||
config.read(config_file)
|
||||
|
||||
MYCALL = config.get("DEFAULT", "MYCALL", fallback="BBS")
|
||||
KISS_HOST = config.get("DEFAULT", "KISS_HOST", fallback="127.0.0.1")
|
||||
KISS_PORT = config.getint("DEFAULT", "KISS_PORT", fallback=8001)
|
||||
BULLETIN_EXPIRATION_DAYS = config.getint("DEFAULT", "BULLETIN_EXPIRATION_DAYS", fallback=7)
|
||||
APRS_PATH = config.get("DEFAULT", "APRS_PATH", fallback="WIDE1-1").split(",")
|
||||
RAW_PACKET_DISPLAY = config.getboolean("DEFAULT", "RAW_PACKET_DISPLAY", fallback=False)
|
Loading…
Add table
Add a link
Reference in a new issue