dep notify self service restart rather than close silently

jwojda
Valued Contributor II

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?

2 ACCEPTED SOLUTIONS

stevewood
Honored Contributor II

@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?

View solution in original post

Tribruin
Contributor III
Contributor III

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.

View solution in original post

3 REPLIES 3

stevewood
Honored Contributor II

@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?

View solution in original post

Tribruin
Contributor III
Contributor III

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.

View solution in original post

jwojda
Valued Contributor II

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