while true; do
# Get the PID of the prpcamerad service
pid=$(pgrep -x "ptpcamerad")
if [ -n "$pid" ]; then
echo "Service prpcamerad is running with PID: $pid. Attempting to stop it..."
# Kill the service using its PID
sudo kill -9 $pid
else
echo "Service ptpcamerad is not running currently."
fi
# Wait for a short period before checking again
sleep 0.05
done
Created
January 5, 2024 07:07
-
-
Save sarkrui/1e8f7043d16e17643f9c92614b8508ce to your computer and use it in GitHub Desktop.
Constantly killing ptpcamerad on Sonoma
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment