From b2d47495596f81dc4fdb07839733ca3dc544b1c5 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Tue, 1 Dec 2015 20:48:47 -0700 Subject: [PATCH] Add check-sync support for Linksys SPA. --- app/registrations/cmd.php | 3 +++ resources/install/scripts/app/event_notify/index.lua | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/app/registrations/cmd.php b/app/registrations/cmd.php index f3f4c0a4f9..73f70f12b8 100644 --- a/app/registrations/cmd.php +++ b/app/registrations/cmd.php @@ -57,6 +57,9 @@ else { if (preg_replace('/^.*?(grandstream).*$/i', '$1', strtolower($agent)) == "grandstream") { $vendor = "grandstream"; } + if (preg_replace('/^.*?(linksys).*$/i', '$1', strtolower($agent)) == "linksys") { + $vendor = "linksys"; + } if (preg_replace('/^.*?(polycom).*$/i', '$1', strtolower($agent)) == "polycom") { $vendor = "polycom"; } diff --git a/resources/install/scripts/app/event_notify/index.lua b/resources/install/scripts/app/event_notify/index.lua index 827ddfe664..e2634eae32 100644 --- a/resources/install/scripts/app/event_notify/index.lua +++ b/resources/install/scripts/app/event_notify/index.lua @@ -85,6 +85,16 @@ end end +--linksys + if (vendor == "linksys") then + if (command == "reboot") then + event:addHeader('event-string', 'reboot=true'); + end + if (command == "check_sync") then + event:addHeader('event-string', 'reboot=true'); + end + end + --polycom if (vendor == "polycom") then if (command == "reboot") then