15.08.2022, 06:59
Use this:
Code:
key = 'pid_' .. event.dst
pid = storage.get(key)
if pid then
os.kill(pid, signal.SIGKILL)
end
value = event.getvalue()
if value then
storage.set(key, os.getpid())
os.sleep(60)
grp.write(event.dst, false)
end
storage.delete(key)