Skip to main content
Jamf Nation, hosted by Jamf, is a knowledgeable community of Apple-focused admins and Jamf users. Join us in person at the ninth annual Jamf Nation User Conference (JNUC) this November for three days of learning, laughter and IT love.

Bash script error - .plist file


I was trying to deploy an app called bridgechecker, which only purpose is to disable the wifi automatically when an ethernet cable was plugged in.

So far I was able to get the pkg file deployed on the test device, but unfortunately the bash script which was sent to me by the support team of this app is either broken or I'm doing it wrong.

This bash script will run after the deployment and it is used to overwrite the contents of a .plist-file.
I've attached the error log from jamf as an attachment.

This is the bash script I was using:

echo "**** Updating defaults for BridgeChecker ******"

#for first three valid values are 0 or 1
#anything you want
#valid values are 0, 1 or 2

defaults write com.accessagility.bridgechecker '{ "releaseIP" = '"$releaseIP"';
                                  "loadOnStartUp" = '"$loadOnStartUp"';
                                  "enableWireless" = '"$enableWireless"';
                                  "EXIT_PASSWORD" = '"$EXIT_PASSWORD"';
                                 "selectedInterfaceOption" = '"$selectedInterfaceOption"';}';

echo "**** Updated defaults successfully ******"         
echo "**** Updated defaults are ******"

defaults read com.accessagility.bridgechecker

Is there maybe an easier way to do this ?
Thank you for your feedback.

Like Comment
Order by:
SOLVED Posted: by tlarkin

If you set the service order of your Macs to have Ethernet be a priority, you can have both WiFi and Ethernet active, it doesn't hurt anything. macOS is smart enough to only use the primary adapter for all network connectivity. So, there should be no need to do this.

SOLVED Posted: by rael

Thanks for the reply. I know that this is possible and we're already set it in this order.
But we want to achieve a release of the ip address when the macbook switches over from wifi to ethernet connection.

SOLVED Posted: by tlarkin

gotcha, well the error message it saying the file doesn't exist. Try downloading something like Suspicious Package and inspect the package you have built and ensure that the plist file is in fact included in the package payloads.

If not, you will have to create it

SOLVED Posted: by rael

I now know where the problem lies. The app has to run after deployment and the macbook needs to be restarted to successfully create the needed plist-file which we want to edit.
This was not mentioned in the deployment guide.

Anyway, thank you for your help!