This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RECEIPT="/Library/Receipts/.appleLoopsLPMandatoryDone" | |
# If RECEIPT not present, run nopkg postinstall script | |
if [ ! -f "$RECEIPT" ]; then | |
exitcode=0 | |
else | |
exitcode=1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RECEIPT="/Library/Receipts/.appleLoopsGBMandatoryDone" | |
# If RECEIPT not present, run nopkg postinstall script | |
if [ ! -f "$RECEIPT" ]; then | |
exitcode=0 | |
else | |
exitcode=1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
currentCompName=$(/bin/hostname) | |
getCompName() { | |
newCompName=$(/usr/bin/osascript <<AppleScript | |
display dialog "Current computer name: ${currentCompName} | |
Please enter the new computer name below. | |
Example: YOUR_EXAMPLE_HOSTNAME_HERE" with title "Set New Computer Name" default answer "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Jamf script to be run after rename-comp.py to verify the configured hostname before continuing to provision | |
# a Mac. | |
# | |
# Usage: | |
# | |
# 1) Add this script to your Jamf instance | |
# 2) Configure the CSV variable below to match what you have listed in your rename-comp.py script | |
# 3) Add this script to your policy so that it runs AFTER rename-comp.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Method inspired by: | |
# https://stackoverflow.com/questions/12768265/bash-compare-a-string-vs-a-list-of-strings | |
# Usage: | |
# | |
# While munki provides minimum_os_version and maximum_os_version to define a supported | |
# OS version range, some software define individual macOS versions as officially | |
# supported. In these cases, defining a supported range is helpful, but ultimately |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>PayloadContent</key> | |
<array> | |
<dict> | |
<key>AttentionPrefBundleIDs</key> | |
<dict/> | |
<key>PayloadDisplayName</key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# MathType 7 license uninstall | |
APP_DIR="/Applications/MathType" | |
APP="${APP_DIR}/MathType.app" | |
EXE_PATH="${APP_DIR}/System/MathTypeLib" | |
PLIST="${APP}/Contents/Info.plist" | |
# Dummy receipt | |
RECEIPT="/Library/Receipts/.MathType7" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Per https://docs.wiris.com/en/mathtype/mathtype_desktop/network_administrators_manual?s%5B%5D=silent&s%5B%5D=installation#macos | |
EMAIL="[email protected]" | |
# Path to MathTypeLib | |
EXE_PATH="/Applications/MathType/System/MathTypeLib" | |
# MathType 7 product key | |
KEY="XXXXX-YYYYY-ZZZZZ-AAAAA-BBBBB" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Use the built-in ipp2ppd tool to create a PPD file for AirPrint | |
PRINTER_IP="ENTER_PRINTER_IP" | |
PPD="/etc/cups/ppd/PRINTER_NAME.ppd" | |
EXE="/System/Library/Printers/Libraries/ipp2ppd" | |
AIR_PPD="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/Resources/AirPrint.ppd" | |
# Create the PPD file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Determine loginwindow processes running and reboot the machine if | |
# more than 1 is detected. | |
USER=$(/usr/sbin/scutil <<< "show State:/Users/ConsoleUser" | /usr/bin/awk -F': ' '/[[:space:]]+Name[[:space:]]:/ { if ( $2 != "loginwindow" ) { print $2 }}') | |
# Searches for loginwindow processes and calculates the number running | |
LOGIN_PROCESSES=$(/usr/bin/pgrep loginwindow) | |
COUNTLOGINS=$(/bin/echo "$LOGIN_PROCESSES" | /usr/bin/wc -l | /usr/bin/sed 's/ //g') | |
LOG="/Library/Logs/ForceReboot.log" |