<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<string>/Applications/Cloudflare WARP.app/Contents/MacOS/Cloudflare WARP</string>
Hmm. I wonder. You might try adding a LimitLoadToSessionType key to the launchd.
If I'm not mistaken, that should tell the LaunchDaemon to only run when someone is logged in, that way it won't try to open the application during the restart process, but only once login has occurred.
This is just a guess. I haven't actually seen an instance of a LaunchDaemon causing an app to open twice like that myself. Hopefully adding that key to your launchd will address it.
@mm2270 thanks so much for jumping in and offering help.
So I made the change you recommended and sadly no dice. Two instances of the app are opened on reboot. Of course the fix would be to have the app not open on boot and have the launchd manage it, but once the app is managed via preferences in Jamf, we cannot disable it from starting automatically. A failure of the vendor.
I had hoped launchd had a way to see an instance was already open and not open another.
#!/bin/sh # find running instances of Cloudflare using grep ps ax | grep -v grep | grep "/Applications/Cloudflare WARP.app" # if grep finds no matches it will return an error code (> 0) if [ $? -gt 0 ]; then "/Applications/Cloudflare WARP.app/Contents/MacOS/Cloudflare WARP" fi