MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / stop

Method stop

Ragnar.py:229–250  ·  view source on GitHub ↗

Stop Ragnar and cleanup all resources.

(self)

Source from the content-addressed store, hash-verified

227 logger.debug("Web portal not running, skipping stop")
228 self.shared_data.web_portal_active = False
229 return False
230 logger.info("Stopping web portal to save memory (wardriving without WiFi)...")
231 self.shared_data.webapp_should_exit = True
232 try:
233 import webapp_modern
234 webapp_modern.socketio.stop()
235 except Exception as e:
236 logger.warning(f"socketio.stop() error: {e}")
237 self._web_thread_ref.join(timeout=5)
238 self.shared_data.web_portal_active = False
239 logger.info("Web portal stopped")
240 return True
241
242 def stop(self):
243 """Stop Ragnar and cleanup all resources."""
244 logger.info("Stopping Ragnar...")
245
246 # Stop PiSugar listener
247 if self.pisugar_listener:
248 self.pisugar_listener.stop()
249
250 # Stop orchestrator
251 self.stop_orchestrator()
252
253 # Stop Wi-Fi manager

Callers 5

wardriving_stopFunction · 0.45
stop_traffic_captureFunction · 0.45
handle_exitFunction · 0.45
stop_web_portalMethod · 0.45
handle_exitFunction · 0.45

Calls 2

stop_orchestratorMethod · 0.95
infoMethod · 0.80

Tested by

no test coverage detected