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)
(hostname, Settings.api_prefix)) if tenant_cache.https_enabled: print("- [HTTPS]\t--> https://%s%s" % (hostname, Settings.api_prefix)) if tenant_cache.onionservice: print("- [Tor]:\t--> http://%s%s" % (tenant_cache.onionservice, Settings.api_prefix)) try: application = service.Application('GLBackend') if not Settings.nodaemon and Settings.logfile: name = os.path.basename(Settings.logfile) directory = os.path.dirname(Settings.logfile) gl_logfile = txlogfile.LogFile(name, directory, rotateLength=Settings.log_file_size, maxRotatedFiles=Settings.num_log_files) application.setComponent(txlog.ILogObserver, LogObserver(gl_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)