Closed ghost closed 6 years ago
I will work on fixing this in the next version I am working on.
Thanks!
Thanks
Updated code...
/bin/echo "#!/bin/bash
## First Run Script to remove the installer.
## Clean up files
/bin/rm -fdr \"$OSInstaller\"
/bin/sleep 2
## Update Device Inventory
/usr/local/jamf/bin/jamf recon
## Remove LaunchDaemon
/bin/rm -f /Library/LaunchDaemons/com.jamfps.cleanupOSInstall.plist
## Remove Script
/bin/rm -fdr /usr/local/jamfps
exit 0" > /usr/local/jamfps/finishOSInstall.sh
Updated output...
#!/bin/bash
## First Run Script to remove the installer.
## Clean up files
/bin/rm -fdr "/Applications/Install macOS High Sierra.app"
/bin/sleep 2
## Update Device Inventory
/usr/local/jamf/bin/jamf recon
## Remove LaunchDaemon
/bin/rm -f /Library/LaunchDaemons/com.jamfps.cleanupOSInstall.plist
## Remove Script
/bin/rm -fdr /usr/local/jamfps
exit 0
Fixed in v2.6 branch, will merge to master when milestone is complete.
Great process, thank you for sharing it. When checking the final results we noticed the installer app is still there. If we parse OSInstaller="$4" value like /Applications/Install macOS High Sierra.app we will need to escape the quotation marks in line 173 like:
Thank you.