Scripts not working

Hi,

I have tried a multiple times and with different settings however I can’t seem to get any of the scripts to work. I am trying the custom image, dock & and policy banner.

My folder looks like this

I am installing the image on M1 Macs and I am using the scripts that came with MDS. Any assistance would be amazing.

Thanks for the help.
Sam

when the machine is set up, look in /var/log/install.log. it will show the script output and any errors.

tim

Hi Tim,

Thanks for the reply, I checked the logs and found this

2022-02-10 22:30:22-08 MacBook-Pro package_script_service[740]: ./postinstall: running script ./100-set_policy_banner.sh /Volumes/MDS/Deploy/Workflows/YappyGeneral-Sales-ed9c6e0ace9ba06b/Packages/zz_com.twocanoes.mds.scripts.pkg /private/tmp/FBCEDED7-08B4-41A6-B16F-07ADE65B96FF /:script
2022-02-10 22:30:22-08 MacBook-Pro package_script_service[740]: ./postinstall: running script ./101-set_desktop_background.sh /Volumes/MDS/Deploy/Workflows/YappyGeneral-Sales-ed9c6e0ace9ba06b/Packages/zz_com.twocanoes.mds.scripts.pkg /private/tmp/FBCEDED7-08B4-41A6-B16F-07ADE65B96FF /:script
2022-02-10 22:30:23-08 MacBook-Pro package_script_service[740]: ./postinstall: running script ./102-set_default_dock.sh /Volumes/MDS/Deploy/Workflows/YappyGeneral-Sales-ed9c6e0ace9ba06b/Packages/zz_com.twocanoes.mds.scripts.pkg /private/tmp/FBCEDED7-08B4-41A6-B16F-07ADE65B96FF /:script
2022-02-10 22:30:28-08 MacBook-Pro package_script_service[740]: ./postinstall: script to install profiles and run scripts complete:success

It says it was a success but then later in the log it says

022-02-10 22:33:24-08 MacBook-Pro Installer[10017]: Failed to load specified background image.

One program failed to install so I am guessing that’s why the dock didn’t install?

Thanks again!
Sam

I think the “Failed to load specified background image” error is related to an installer warning and not the script. Can you post the script you expect to work and see if it actually copied the files to the correct locations?

tim

Thanks for the reply Tim. I am using the script found in the documentation folder.

#!/bin/bash

BASENAME=${0##*/}
SCRIPTDIR=${0%$BASENAME}

DESKTOP_PICTURES_FOLDER="/Users/Shared/Desktop Pictures/"
DESKTOP_PICTURE_FILE=“tcu_background.jpg”

if ! [ -e “${DESKTOP_PICTURES_FOLDER}” ] ; then
/bin/mkdir -p “${DESKTOP_PICTURES_FOLDER}”
fi

/bin/cp “${SCRIPTDIR}/Resources/${DESKTOP_PICTURE_FILE}” “${DESKTOP_PICTURES_FOLDER}”

/bin/chmod r+ugo “${DESKTOP_PICTURES_FOLDER}/${DESKTOP_PICTURE_FILE}”

/usr/bin/profiles install -type configuration -path “${SCRIPTDIR}/Resources/com.apple.desktop.mobileconfig”

exit 0

I have checked the Mac and I can’t find the image in the “System/library/Desktop Pictures” folder.

Thanks so much again for the help!

Cheers!
Sam

This is using an older version of the script that uses the “profile” command. That command no longer works as of Big Sur. Try using the “CustomDesktop” package from the sample-packages.zip on twocanoes / macdeploystick / Downloads — Bitbucket. That should work a lot better.

tim

Thanks Tim!

Is there a way for MDS to run this when it install the other applications. Or is it something I will need to run after the install has completed?

Cheers!
Sam