mirror of
https://github.com/jamf/Setup-Manager.git
synced 2026-02-03 14:13:24 +00:00
Feature request: Store finish timestamp of successful completion of JSM #138
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jrmfong on GitHub.
It would be very useful in creating smart groups based on the enrollment time through JSM if there is a flag file with completion time.
This will give us more granular control where policies can be run after x days of build.
It is suggested that completion time can be added to the flag file - /private/var/db/.JamfSetupEnrollmentDone
@entusdictus commented on GitHub:
You already can. The flag file has a timestamp on it which can be utilized by an extension attribute. You may use this code snippet as a base for your extension attribute:
stat -x -t "%Y-%m-%d" "/private/var/db/.JamfSetupEnrollmentDone" | grep "Birth" | awk '{print $2}'Of course you can adjust the timestamp and the awk to also include %H:%M:%S, if needed.
@scriptingosx commented on GitHub:
This has been implemented with v1.1beta. Please test and let us know if this works for you.
@scriptingosx commented on GitHub:
shorter stat command: