I don't see anything obvious in the "intunePre.sh" script that is checking for any evidence of being run previously. In the "intunePost.sh" script, I see this block of code but it's commented out:
`#Check if we've run before
#if [[ -f "$logDir/onboardingComplete" ]]; then
echo "$(date) | POST | We've already completed onboarding, let's exit quietly"
exit 1
#fi`
Then at the end of the post script, I see a "touch" to create the "onboardComplete" file. Why is the above block commented out and why is it in the post script instead of the pre-script? If it were uncommented and placed in the pre-script, would it in fact abort the whole PKG installation given exit code of 1?
My hope would be to deploy this package to all devices except those that have previously onboarded. It would be easy enough to run a short script in advance to do that "touch" if it certain that the Swift onboarding package won't try to install and run if that file exists.
I see in the non-PKG version of the Swift onboading folder that the script that kicks everything off does ensure that it's only running for new enrollments but that configuration isn't ideal for us due to having to store all of the scripts behind it in a "public" store and Azure Blob/AWS S3.
I don't see anything obvious in the "intunePre.sh" script that is checking for any evidence of being run previously. In the "intunePost.sh" script, I see this block of code but it's commented out:
`#Check if we've run before
#if [[ -f "$logDir/onboardingComplete" ]]; then
echo "$(date) | POST | We've already completed onboarding, let's exit quietly"
exit 1
#fi`
Then at the end of the post script, I see a "touch" to create the "onboardComplete" file. Why is the above block commented out and why is it in the post script instead of the pre-script? If it were uncommented and placed in the pre-script, would it in fact abort the whole PKG installation given exit code of 1?
My hope would be to deploy this package to all devices except those that have previously onboarded. It would be easy enough to run a short script in advance to do that "touch" if it certain that the Swift onboarding package won't try to install and run if that file exists.
I see in the non-PKG version of the Swift onboading folder that the script that kicks everything off does ensure that it's only running for new enrollments but that configuration isn't ideal for us due to having to store all of the scripts behind it in a "public" store and Azure Blob/AWS S3.