Created
May 19, 2018 19:49
-
-
Save smashism/44fea7cfe1fa5d4671b968871de86733 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
nameString="$4" # What to put in a name string | |
plistName="$5" # Name of the plist file (e.g., com.planetexpress.expendable.plist) | |
plistPath="$6" # Path to plist file (e.g., /Users/Shared/Careerchips) | |
currentDate=$(date +"%Y-%m-%d %H:%M:%S") # Creates date in format Jamf can use for date-based data type EA | |
defaults write $plistPath/$plistName name "$nameString" # Double-duty: will make plist if doesn't exist, then write the value! | |
defaults write $plistPath/$plistName date "$currentDate" # Date can be used in Jamf EA with "Date" data type. | |
# Dosvedanya, comrade! | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment