Revert "fix(fix_services): merge duplicate pattern handlers 5 and 6"

This reverts commit 3962c75730.
This commit is contained in:
Jeroen Oudshoorn
2026-03-25 18:20:10 +01:00
parent 4ec96bdc85
commit 6e8dbaf90c
+11 -3
View File
@@ -244,9 +244,17 @@ class FixServices(plugins.Plugin):
except Exception as err:
logging.error("[Fix_Services monstart]: %s" % repr(err))
# Look for patterns 5 or 6 (bettercap crash / Go panic)
elif (self.pattern5.findall(other_other_last_lines) or
self.pattern6.findall(other_other_last_lines)):
# Look for pattern 5
elif len(self.pattern5.findall(other_other_last_lines)) >= 1:
logging.debug("[Fix_Services] Bettercap has crashed!")
if hasattr(agent, 'view'):
display.set('status', 'Restarting pwnagotchi!')
display.update(force=True)
subprocess.run(["systemctl", "restart", "bettercap"], timeout=30)
pwnagotchi.restart("AUTO")
# Look for pattern 6
elif len(self.pattern6.findall(other_other_last_lines)) >= 1:
logging.debug("[Fix_Services] Bettercap has crashed!")
if hasattr(agent, 'view'):
display.set('status', 'Restarting pwnagotchi!')