Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-09-16 22:05:42 +02:00
parent a03277a97f
commit 226658468e

View File

@ -4,6 +4,8 @@ import subprocess
import time import time
import random import random
from io import TextIOWrapper from io import TextIOWrapper
import pwnagotchi
from pwnagotchi import plugins from pwnagotchi import plugins
import pwnagotchi.ui.faces as faces import pwnagotchi.ui.faces as faces
@ -197,8 +199,8 @@ class FixServices(plugins.Plugin):
display.update(force=True) display.update(force=True)
try: try:
# Run the monstart command to restart wlan0mon # Run the monstart command to restart wlan0mon
cmd_output = subprocess.check_output("systemctl restart pwnagotchi", shell=True) pwnagotchi.restart("AUTO")
logging.info("[Fix_Services systemd]: %s" % repr(cmd_output)) logging.info("[Fix_Services systemd]: restarting bettercap and pwnagotchi")
except Exception as err: except Exception as err:
logging.error("[Fix_Services systemd]: %s" % repr(err)) logging.error("[Fix_Services systemd]: %s" % repr(err))