def stop_suricata_daemon(self):
        """Stop Suricata daemon using socket control."""
        logger.debug("stop_suricata_daemon() called")
        if not self.suricata_is_running:
            logger.warn(
                "stop_suricata_daemon() called but Suricata may not be running."
                " Still attempting shutdown but it will likely error."
            )
        try:
            self.connect()
            self.shutdown()
            self.close()
        except Exception as e:
            print_error(
                f"Problem shutting down old Suricata instance in stop_suricata_daemon(): {e}"
            )
        finally:
            self.suricata_is_running = False
Stop Suricata daemon using socket control.
dalton-agent/dalton-agent.py