Skip to main content
Solved

dep notify self service restart rather than close silently

  • August 13, 2020
  • 3 replies
  • 33 views

ImAMacGuy
Forum|alt.badge.img+23

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?

Best answer by stevewood

@jwojda

Instead of using the restart command in DEPNotify have you thought about just using the policy restart commands? Perhaps throwing another status in DEPNotify that says "A restart is required... restarting." and then let the policy handle it?

3 replies

stevewood
Forum|alt.badge.img+38
  • Hall of Fame
  • Answer
  • August 13, 2020

@jwojda

Instead of using the restart command in DEPNotify have you thought about just using the policy restart commands? Perhaps throwing another status in DEPNotify that says "A restart is required... restarting." and then let the policy handle it?


Forum|alt.badge.img+20
  • Honored Contributor
  • August 13, 2020

I would say yes it would be better to use the Restart option in the policy. If you try and restart in the script, then Jamf will never recognize that policy completed successfully.


ImAMacGuy
Forum|alt.badge.img+23
  • Author
  • Esteemed Contributor
  • August 13, 2020

@stevewood @RBlount Thank you, I will try those ideas!