Add popup command parameter to the system module

This commit is contained in:
Sam Tebbs 2022-05-20 09:21:20 +01:00
parent 2e8495d5ff
commit 91b1b5e037
2 changed files with 6 additions and 0 deletions

View file

@ -72,6 +72,11 @@ class Module(core.module.Module):
util.cli.execute(command)
def popup(self, widget):
popupcmd = self.parameter("popupcmd", "");
if (popupcmd != ""):
util.cli.execute(popupcmd)
return
menu = util.popup.menu()
reboot_cmd = self.parameter("reboot", "reboot")
shutdown_cmd = self.parameter("shutdown", "shutdown -h now")