Shell scripting: Iterate over a list line-by-line instead of word-by-word

Let’s say a directory contains these files: My First File.txtMy Second File.txt If you wanted to take an action on each distinct file, you might try something like this: for file in `ls ~`; do echo $file; done The output will look like below, because the spaces and line breaks are both treated delineators of… Continue reading Shell scripting: Iterate over a list line-by-line instead of word-by-word

Munki nopkg to turn Bluetooth on and off

I’ve posted a Munki nopkg installer to control Bluetooth. Assigning it for install causes Bluetooth to be (re)enabled whenever Munki runs. Uninstallation turns Bluetooth off. https://github.com/davidmnelson/munki-nopkg/blob/master/BluetoothEnabled.plist

Munki, Monolithic Imaging, and Microsoft Office 2016 Volume License Serializer

If you have Macs that were cloned from an already-activated system (either via monolithic imaging, or one-off machines that were migrated or experienced hardware failure) you will find that your Office 2016 activation is broken. You will also find that Munki doesn’t know it needs to re-run the Office 2016 serializer since a receipt already… Continue reading Munki, Monolithic Imaging, and Microsoft Office 2016 Volume License Serializer

Deploying Epson EasyMP Multi PC Projection for Mac

When adding Epson EasyMP Multi PC Projection 2.1.0 to Munki, I found that the built-in postinstall script fails. Some digging revealed that the script was expecting a file to exist at </tmp/mpp-72B3FDFF-9513-4CED-96C3-34881FC77AB8>. It reads that file and uses the value contained for the “ClientMode” preference in </Library/Preferences/com.epson.EasyMP_Multi_PC_Projection.Settings/mppsettings.xml> On a successful install the the GUI, that… Continue reading Deploying Epson EasyMP Multi PC Projection for Mac

Using SSH Keys for Passwordless Authentication

SSH keys can provide an additional layer of security (if you also disable password authentication on the server), or they can simplify the process of connecting to remote servers. For our purposes we’re interested in the latter – connecting to the server without entering a password. The basic idea is that you create a public/private… Continue reading Using SSH Keys for Passwordless Authentication

Desktop Picture Profile Creator

DesktopPictureProfileCreator is a simple bash script that generates mobileconfig profiles for managing the desktop picture on macOS computers. Run the script followed by the path to the image you want to set as the desktop picture. For example “sh DesktopPictureProfileCreator.sh /Library/Desktop\ Pictures/Aqua\ Blue.jpg”. Whatever path you specify must exist in the same location on the computer(s) you intend… Continue reading Desktop Picture Profile Creator

AirPrintProfileCreator

AirPrintProfileCreator is a simple bash script which aids you in creating mobileconfig profiles that enable iOS devices to print to a CUPS server. Download and run the script on your server (“sudo sh AirPrintProfileCreator.sh”) and follow the prompts on screen. When the profile has been created, you can install it on your iOS device via… Continue reading AirPrintProfileCreator