In working with @stevewood's excellent script I was able to get everything working, but some of the apps want a logout or reboot. I went to the Depnotify readme and plugged in the commands at the end of the script, but it seems to pop up right away with the restart (apps are still installing), and then the app just quits silently when the installs are done.
elif [ "$TESTING_MODE" = false ]; then
"$jb" policy -event "$(echo "$POLICY" | cut -d ',' -f2)" --forceNoRecon
fi
done
echo "Command: Restart: Done provisioning the system for use" >> "$dnlog"
Would it be better to just set the policy to reboot at the end?