From 366c7308fa6c05bb80dec0609e9c4bf6c281cb24 Mon Sep 17 00:00:00 2001 From: "jesse.fuller" Date: Tue, 9 Aug 2022 15:55:56 +0900 Subject: [PATCH] Better slack detection, added discord --- autorunscript.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/autorunscript.sh b/autorunscript.sh index b31fbcd..1c803e4 100755 --- a/autorunscript.sh +++ b/autorunscript.sh @@ -13,11 +13,12 @@ localIP=$(ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}' | head # Running Meetings -zoomMeeting=$(lsof -anP -i4 -sTCP:LISTEN | grep zoom.us) +zoomMeeting=$(lsof -anP -i4 -sTCP:LISTEN | grep zoom.us | grep ${localIP}:'*') microsoftTeams=$(lsof -anP -i4 -sTCP:LISTEN | grep Microsoft | grep ${localIP}:'*') ciscoWebEX=$(lsof -anP -i4 -sTCP:LISTEN | grep Meeting) -slack=$(lsof -anP -i4 -sTCP:LISTEN | grep 'Slack*') -faceTime=$(lsof -anP -i4 -sTCP:LISTEN | grep avconfere) +slack=$(lsof -anP -i4 -sTCP:LISTEN | grep 'Slack*' | grep 'UDP \*') +faceTime=$(lsof -anP -i4 -sTCP:LISTEN | grep avconfere | grep ${localIP}:'*') +discordMeeting=$(lsof -anP -i4 -sTCP:LISTEN | grep Discord | grep 'UDP \*') # API Functions function turnOff { @@ -41,7 +42,7 @@ function TurnOnGreen { ######################################################################################### ######################################################################################### -if [[ -n "$zoomMeeting" || -n "$microsoftTeams" || -n "$ciscoWebEX" || -n "$slack" || -n "$faceTime" ]];then +if [[ -n "$zoomMeeting" || -n "$microsoftTeams" || -n "$ciscoWebEX" || -n "$slack" || -n "$faceTime" || -n "$discordMeeting"]];then echo "Meeting running" TurnOnRed else