Ejemplo n.º 1
0
def main():
    print("""

OpenWebRX - Open Source SDR Web App for Everyone!  | for license see LICENSE file in the package
_________________________________________________________________________________________________

Author contact info:    Jakob Ketterl, DD5JFK <*****@*****.**>
Documentation:          https://github.com/jketterl/openwebrx/wiki
Support and info:       https://groups.io/g/openwebrx

    """)

    logger.info(
        "OpenWebRX version {0} starting up...".format(openwebrx_version))

    pm = Config.get()

    configErrors = Config.validateConfig()
    if configErrors:
        logger.error(
            "your configuration contains errors. please address the following errors:"
        )
        for e in configErrors:
            logger.error(e)
        return

    featureDetector = FeatureDetector()
    if not featureDetector.is_available("core"):
        logger.error(
            "you are missing required dependencies to run openwebrx. "
            "please check that the following core requirements are installed and up to date:"
        )
        logger.error(", ".join(featureDetector.get_requirements("core")))
        return

    # Get error messages about unknown / unavailable features as soon as possible
    SdrService.loadProps()

    Services.start()

    try:
        server = ThreadedHttpServer(("0.0.0.0", pm["web_port"]),
                                    RequestHandler)
        server.serve_forever()
    except KeyboardInterrupt:
        WebSocketConnection.closeAll()
        Services.stop()
        PskReporter.stop()
Ejemplo n.º 2
0
def main():
    print("""

OpenWebRX - Open Source SDR Web App for Everyone!  | for license see LICENSE file in the package
_________________________________________________________________________________________________

Author contact info:    Jakob Ketterl, DD5JFK <*****@*****.**>

    """)

    pm = PropertyManager.getSharedInstance().loadConfig()

    featureDetector = FeatureDetector()
    if not featureDetector.is_available("core"):
        print(
            "you are missing required dependencies to run openwebrx. "
            "please check that the following core requirements are installed:")
        print(", ".join(featureDetector.get_requirements("core")))
        return

    # Get error messages about unknown / unavailable features as soon as possible
    SdrService.loadProps()

    if "sdrhu_key" in pm and pm["sdrhu_public_listing"]:
        updater = SdrHuUpdater()
        updater.start()

    Services.start()

    try:
        server = ThreadedHttpServer(
            ("0.0.0.0", pm.getPropertyValue("web_port")), RequestHandler)
        server.serve_forever()
    except KeyboardInterrupt:
        WebSocketConnection.closeAll()
        Services.stop()
        PskReporter.stop()