Skip to content

Instantly share code, notes, and snippets.

@brunerd
Created February 15, 2022 04:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save brunerd/5ca9bf0605e82df1678fab644e50fbaf to your computer and use it in GitHub Desktop.
Save brunerd/5ca9bf0605e82df1678fab644e50fbaf to your computer and use it in GitHub Desktop.
Simple shell script function to determine if a Zoom meeting is in progress
#!/bin/sh
#inZoomMeeting (20220214) Copyright (c) 2021 Joel Bruner (https://github.com/brunerd)
#Licensed under the MIT License
function inZoomMeeting {
#if this process exists, there is a meeting, return 0 (sucess), otherwise 1 (fail)
pgrep "CptHost" &>/dev/null && return 0 || return 1
}
if inZoomMeeting; then
echo "In meeting"
exit 1
else
echo "Not in meeting"
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment