diff options
Diffstat (limited to 'modules-available/remoteaccess/hooks/client-update.inc.php')
-rw-r--r-- | modules-available/remoteaccess/hooks/client-update.inc.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules-available/remoteaccess/hooks/client-update.inc.php b/modules-available/remoteaccess/hooks/client-update.inc.php new file mode 100644 index 00000000..ecf5d91c --- /dev/null +++ b/modules-available/remoteaccess/hooks/client-update.inc.php @@ -0,0 +1,9 @@ +<?php + +if ($type === '~poweron') { + Database::exec("UPDATE remoteaccess_machine SET password = NULL WHERE machineuuid = :uuid", + ['uuid' => $uuid]); +} elseif ($type === '~poweroff') { + Database::exec("UPDATE remoteaccess_machine SET woltime = 0 WHERE machineuuid = :uuid", + ['uuid' => $uuid]); +} |