Esempio n. 1
0
def main():
    try:
        # Don't do anything until there is an internet connection
        while not check_internet_connection():
            logger.info("Waiting for internet connection...")
            time.sleep(3)

        # Try to update the DNS configuration
        update_dns_file()

        # Hack around dodgy Raspberry Pi things
        enable_prom_mode_on_wlan0()

        # Just make sure everything is fine
        restart_dnsmasq()

        config_server.start()
        start_afo_patching()
        start_process("dcvoip")
        start_process("dcgamespy")
        start_process("dc2k2")
        return process()
    except:
        logger.exception("Something went wrong...")
        return 1
    finally:
        stop_process("dc2k2")
        stop_process("dcgamespy")
        stop_process("dcvoip")
        stop_afo_patching()

        config_server.stop()
        logger.info("Dreampi quit successfully")
Esempio n. 2
0
def main():
    try:
        # Don't do anything until there is an internet connection
        while not check_internet_connection():
            logger.info("Waiting for internet connection...")
            time.sleep(3)

        # Try to update the DNS configuration
        update_dns_file()

        config_server.start()
        start_afo_patching()
        start_process("dcvoip")
        start_process("dcgamespy")
        return process()
    except:
        logger.exception("Something went wrong...")
        return 1
    finally:
        stop_process("dcgamespy")
        stop_process("dcvoip")
        stop_afo_patching()

        config_server.stop()
        logger.info("Dreampi quit successfully")
Esempio n. 3
0
def main():
    try:
        config_server.start()
        start_afo_patching()
        start_dcvoip_process()
        return process()
    except:
        logger.exception("Something went wrong...")
        return 1
    finally:
        stop_dcvoip_process()
        stop_afo_patching()
        
        config_server.stop()
        logger.info("Dreampi quit successfully")