Merge pull request #529 from CoderFX/fix/fix-services-os-system

fix(fix_services): replace os.system with subprocess.run
This commit is contained in:
Jayofelony
2026-03-11 07:20:30 +01:00
committed by GitHub

View File

@@ -233,7 +233,7 @@ class FixServices(plugins.Plugin):
if hasattr(agent, 'view'):
display.set('status', 'Restarting pwnagotchi!')
display.update(force=True)
os.system("systemctl restart bettercap")
subprocess.run(["systemctl", "restart", "bettercap"], timeout=30)
pwnagotchi.restart("AUTO")
# Look for pattern 6
@@ -242,7 +242,7 @@ class FixServices(plugins.Plugin):
if hasattr(agent, 'view'):
display.set('status', 'Restarting pwnagotchi!')
display.update(force=True)
os.system("systemctl restart bettercap")
subprocess.run(["systemctl", "restart", "bettercap"], timeout=30)
pwnagotchi.restart("AUTO")
# Look for pattern 7