macOSUpgrade icon indicating copy to clipboard operation
macOSUpgrade copied to clipboard

Self Service won't quit when ran from self service

Open kylejericson opened this issue 4 years ago • 3 comments

I have created this policy and it seems to run fine, but it doesn't seem to quit self-service.

I'm currently testing this on line 189

declare -a startosinstallOptions=(--agreetolicense --forcequitapps --nointeraction && sleep 10 && osascript -e 'tell application "Self Service" to quit')

I add this right before this command at the end of the script.

sudo killall 'Self Service'

Begin Upgrade

startosinstallCommand=""$OSInstaller/Contents/Resources/startosinstall" ${startosinstallOptions[*]} >> $osinstallLogfile 2>&1 &" /bin/echo "Running a command as '$startosinstallCommand'..." eval "$startosinstallCommand"

Again this all could just be a user error.

kylejericson avatar Dec 03 '20 06:12 kylejericson

This is a duplicate issue #135. It is addressed #140. Could you share us condition of failure detail?

taniguti avatar Dec 03 '20 13:12 taniguti

The new issue stems from the discovery that the --forcequitapps flag is no longer quitting Self Service when used with macOS 11 Big Sur installers. https://www.jamf.com/jamf-nation/discussions/37297/big-sur-upgrade-bash-command

Those that are running startosinstall directly have resorted to leveraging AppleScript to facilitate the quit command as a workaround.

UESCDurandal avatar Dec 09 '20 01:12 UESCDurandal

I did test this on macOS High Sierra and same issue with Self Service not quitting.

kylejericson avatar Dec 16 '20 15:12 kylejericson