Пример #1
0
 def _openLogFile(self, path):
     return openLogFile(path, Settings.log_file_size, Settings.num_log_files)
Пример #2
0
 def _openLogFile(self, path):
     return openLogFile(path, Settings.log_file_size, Settings.num_log_files)
Пример #3
0
        print("GlobaLeaks is now running and accessible at the following urls:")

        tenant_cache = self.state.tenant_cache[1]

        if self.state.settings.devel_mode:
            for port in Settings.bind_local_ports:
                print("- [HTTP]\t--> http://127.0.0.1:%d" % port)

        elif self.state.tenant_cache[1].reachable_via_web:
            hostname = tenant_cache.hostname if tenant_cache.hostname else '0.0.0.0'
            print("- [HTTP]\t--> http://%s" % hostname)
            if tenant_cache.https_enabled:
                print("- [HTTPS]\t--> https://%s" % hostname)

        if tenant_cache.onionservice:
            print("- [Tor]:\t--> http://%s" % tenant_cache.onionservice)


try:
    application = service.Application('GLBackend')

    if not Settings.nodaemon:
        logfile = openLogFile(Settings.logfile, Settings.log_file_size, Settings.num_log_files)
        application.setComponent(ILogObserver, LogObserver(logfile).emit)

    Service().setServiceParent(application)
except Exception as excep:
    fail_startup(excep)
    # Exit with non-zero exit code to signal systemd/systemV
    sys.exit(55)
Пример #4
0
        print("GlobaLeaks is now running and accessible at the following urls:")

        tenant_cache = self.state.tenant_cache[1]

        if self.state.settings.devel_mode:
            for port in Settings.bind_local_ports:
                print("- [HTTP]\t--> http://127.0.0.1:%d" % port)

        elif self.state.tenant_cache[1].reachable_via_web:
            hostname = tenant_cache.hostname if tenant_cache.hostname else '0.0.0.0'
            print("- [HTTP]\t--> http://%s" % (hostname))
            if tenant_cache.https_enabled:
                print("- [HTTPS]\t--> https://%s" % hostname)

        if tenant_cache.onionservice:
            print("- [Tor]:\t--> http://%s" % tenant_cache.onionservice)


try:
    application = service.Application('GLBackend')

    if not Settings.nodaemon:
        logfile = openLogFile(Settings.logfile, Settings.log_file_size, Settings.num_log_files)
        application.setComponent(ILogObserver, LogObserver(logfile).emit)

    Service().setServiceParent(application)
except Exception as excep:
    fail_startup(excep)
    # Exit with non-zero exit code to signal systemd/systemV
    sys.exit(55)