Created
February 15, 2022 04:14
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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