Whats the best way to deploy a package to a Mac and force a reboot?
What is the best way install a .pkg on a Mac and force a reboot when complete? I want to ensure users have the ability to snooze the install which will reboot the system.
0 Comments
[ + ] Show comments
Answers (1)
Answer Summary:
Please log in to answer
Posted by:
chucksteel
9 years ago
Create a install.sh script that will run the install and then the reboot command. It will look like this:
installer -pkg package.pkg -target /
shutdown -r now
Make sure the script is set as executable using the chmod command. Place the script in the same folder as the pkg and compress both of them into an archive. Upload this archive to the software title. When you create the distribution use the custom command option and enter the following:
unzip -o archive.zip && install.sh
I use this technique for complicated installs regularly although I don't force a reboot.