Hello, I am using the script from MacMule to deploy our Okta SSO extension to our safari browsers. It appears the script is succeeding on macbook pro's, but is failing on iMac machines. The script is below as well as the error output. Can anyone shed any light on the specific error message i am getting? Safari does properly launch if its not running on a macbook pro....
!/bin/bash
##############################################################################################
More information: https://macmule.com/2014/10/15/deploying-installing-safari-extensions-on-safari-6-1-7-2/
GitRepo: https://github.com/macmule/InstallSafariExtensionsViaSelfService/
License: https://macmule.com/license/
#############################################################################################
##############################################################################################
DEFINE VARIABLES & READ IN PARAMETERS
##############################################################################################
HARDCODED VALUE FOR "PATHTOEXTENSION" IS SET HERE
pathToExtension="/private/tmp/okta.swa.safari-5.1.5-3.safariextz"
CHECK TO SEE IF A VALUE WAS PASSED IN PARAMETER 4 AND, IF SO, ASSIGN TO "PATHTOEXTENSION"
if [ "$4" != "" ] && [ "$pathToExtension" == "" ];then
pathToExtension=$4
fi
Error if variable appName is empty
if [ "$pathToExtension" == "" ]; then
echo "Error: No value was specified for the pathToExtension variable..."
exit 1
fi
##############################################################################################
Launch Safari if not open
osascript -e 'tell application "Safari"
activate
end tell'
Prompt the user to install the extension given @ $4
osascript -e 'tell application "Safari"
open "'"$pathToExtension"'"
end tell'
Exit silently, as will error if exists & if times out for whatever reason
exit 0}
Executing Policy Okta Safari Browser Extension...
Downloading https://kibsdjss.kibsd.org/Packages/okta.swa.safari-5.1.5-3.safariextz.dmg...
Verifying DMG...
Installing okta.swa.safari-5.1.5-3.safariextz.dmg...
Closing package...
Running script OktaSafariExtension.sh...
Script exit code: 0
Script result: 24:36: execution error: An error of type -10810 has occurred. (-10810)
24:83: execution error: Safari got an error: Application isn’t running. (-600)