in some case the jamfhelper killed by terminal or Activity Monitor it will not return 239 error code and return empty intend
old code
checkAttemptToQuit(){
Value="${1}"
# Jamf Helper was exited without making a choice
if [[ "$Value" == "239" ]]; then
echo "Jamf Helper was exited without making a choice."
"$jamf" policy -event "$CustomTriggerNameDeprecationPolicy" &
exit 0
fi
}
fix
checkAttemptToQuit(){
Value="${1}"
# Jamf Helper was exited without making a choice
# pngo 12/31/21: include empty return code
# The 239 return value is defaults when user quit the jamfhelper (Command+Q) if user kill it using kill [pid] command it will return empty
if [[ "$Value" == "239" ]] || [[ -z "$Value" ]]; then
echo "Jamf Helper was exited without making a choice."
"$jamf" policy -event "$CustomTriggerNameDeprecationPolicy" &
exit 0
fi
}