This repository has been archived by the owner on Nov 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
macmule
committed
May 13, 2015
1 parent
39483c1
commit c09b2e7
Showing
48 changed files
with
9,035 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?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>CFBundleDevelopmentRegion</key> | ||
<string>en</string> | ||
<key>CFBundleExecutable</key> | ||
<string>${EXECUTABLE_NAME}</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.macmule.${PRODUCT_NAME:rfc1034identifier}</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>${PRODUCT_NAME}</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>0.0.1</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>0.0.1</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>${MACOSX_DEPLOYMENT_TARGET}</string> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>Copyright © 2015 macmule. All rights reserved.</string> | ||
<key>NSMainNibFile</key> | ||
<string>MainMenu</string> | ||
<key>NSPrincipalClass</key> | ||
<string>NSApplication</string> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// | ||
// Prefix header | ||
// | ||
// The contents of this file are implicitly included at the beginning of every source file. | ||
// | ||
|
||
#ifdef __OBJC__ | ||
#import <Cocoa/Cocoa.h> | ||
#endif |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,192 @@ | ||
#!/bin/sh | ||
################################################################################################ | ||
# | ||
# Used by AutoCasperNBI created nbi's on launch to set Time, Screen Sharing & install Certificates | ||
# | ||
################################################################################################ | ||
|
||
######## | ||
# | ||
# Set Time Server & Zone | ||
# | ||
######## | ||
|
||
# If file exists, read from it & set Time Server & Zone | ||
if [ -f /Library/Application\ Support/AutoCasperNBI/Settings/TimeSettings.plist ]; then | ||
|
||
echo "Getting Time Server & Zone settings..." | ||
|
||
# Get Time Server from plist | ||
timeServer=$(sudo defaults read /Library/Application\ Support/AutoCasperNBI/Settings/TimeSettings.plist timeServer) | ||
|
||
echo "Setting Time Server..." | ||
|
||
/usr/sbin/systemsetup -setnetworktimeserver "$timeServer" | ||
|
||
echo "Set Time Server" | ||
|
||
# Get Time Zone from plist | ||
timeZone=$(sudo defaults read /Library/Application\ Support/AutoCasperNBI/Settings/TimeSettings.plist timeZone) | ||
|
||
echo "Setting Time Zone..." | ||
|
||
/usr/sbin/systemsetup -settimezone "$timeZone" | ||
|
||
echo "Set Time Zone" | ||
|
||
# Enable Network time | ||
|
||
echo "Enabling Network Time..." | ||
|
||
/usr/sbin/systemsetup -setusingnetworktime on | ||
|
||
echo "Network Time enabled." | ||
|
||
else | ||
|
||
echo "TimeSettings.plist does not exist..." | ||
|
||
fi | ||
|
||
######## | ||
# | ||
# Create ARD User | ||
# | ||
######## | ||
|
||
# If file exists, read from it & create the ARD User | ||
if [ -f /Library/Application\ Support/AutoCasperNBI/Settings/ARDUser.plist ]; then | ||
|
||
echo "ARDUser.plist exists.. Getting values.." | ||
|
||
# Get encoded ARD Username from plist | ||
ardUsernameEncoded=$(sudo defaults read /Library/Application\ Support/AutoCasperNBI/Settings/ARDUser.plist ARDUsername) | ||
echo "Retrieved ARD User..." | ||
|
||
# Decode ARD Username | ||
ardUsername=$(echo $ardUsernameEncoded | openssl base64 -d ) | ||
echo "Decoded ARD User..." | ||
|
||
# Get encoded ARD Password from plist | ||
ardPasswordEncoded=$(sudo defaults read /Library/Application\ Support/AutoCasperNBI/Settings/ARDUser.plist ARDPassword) | ||
echo "Retrieved ARD Password..." | ||
|
||
# Decode ARD Password | ||
ardPassword=$(echo $ardPasswordEncoded | openssl base64 -d) | ||
echo "Decoded ARD Password..." | ||
|
||
# Create ARD User | ||
dscl . create /Users/$ardUsername | ||
echo "ARD User created..." | ||
|
||
# Set ARD User password | ||
dscl . passwd /Users/$ardUsername $ardPassword | ||
echo "ARD Password set..." | ||
|
||
# ARD User UniqueID set | ||
dscl . create /Users/$ardUsername UniqueID 600 | ||
echo "Set ARD Users UniqueID..." | ||
|
||
else | ||
|
||
echo "ARDUser.plist does not exist..." | ||
|
||
fi | ||
|
||
######## | ||
# | ||
# Screen Sharing | ||
# | ||
######## | ||
|
||
# If both the ARDUser.plist & com.apple.VNCSettings.txt files exist | ||
if [ -f /Library/Application\ Support/AutoCasperNBI/Settings/ARDUser.plist ] && [ -f /Library/Preferences/com.apple.VNCSettings.txt ]; then | ||
|
||
echo "Enabling ARD & VNC..." | ||
|
||
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -restart -agent -privs -all | ||
|
||
echo "ARD & VNC enabled..." | ||
|
||
# If only the file com.apple.VNCSettings.txt exists | ||
elif [ ! -f /Library/Application\ Support/AutoCasperNBI/Settings/ARDUser.plist ] && [ -f /Library/Preferences/com.apple.VNCSettings.txt ]; then | ||
|
||
echo "Enabling VNC..." | ||
|
||
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -clientopts -setvnclegacy -vnclegacy yes -restart -agent | ||
|
||
echo "VNC enabled..." | ||
|
||
# If only the file ARDUser.plist exists | ||
elif [ -f /Library/Application\ Support/AutoCasperNBI/Settings/ARDUser.plist ] && [ ! -f /Library/Preferences/com.apple.VNCSettings.txt ]; then | ||
|
||
echo "Enabling ARD..." | ||
|
||
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent -privs -all | ||
|
||
echo "ARD enabled for all users..." | ||
|
||
else | ||
echo "No files found to enable screen sharing..." | ||
fi | ||
|
||
######## | ||
# | ||
# Certificates | ||
# | ||
######## | ||
|
||
# Save IFS | ||
setIFS=$IFS | ||
|
||
# Set IFS to space | ||
IFS=$(echo -en "\n\b") | ||
|
||
# Check to see if /Library/Application\ Support/AutoCasperNBI/Certificates/ contains certs | ||
if [ "$(ls -A /Library/Application\ Support/AutoCasperNBI/Certificates/)" ]; then | ||
|
||
# For each Certificate found... | ||
for certificate in /Library/Application\ Support/AutoCasperNBI/Certificates/* | ||
do | ||
|
||
echo "Installing Certificate $certificate..." | ||
|
||
# Install found certificates in the System keychain as root, | ||
/usr/bin/security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "$certificate" | ||
|
||
done | ||
|
||
else | ||
|
||
echo "No Certificates to install..." | ||
|
||
fi | ||
|
||
# Reset IFS | ||
setIFS=$IFS | ||
|
||
######## | ||
# | ||
# Disable Gatekeeper | ||
# | ||
######## | ||
|
||
spctl --master-disable | ||
|
||
echo "GateKeeper disabled..." | ||
|
||
######## | ||
# | ||
# Energy Saver Preferences | ||
# | ||
######## | ||
|
||
pmset -a displaysleep 180 disksleep 0 sleep 0 hibernatemode 0 womp 1 autopoweroffdelay 0 standbydelay 0 ttyskeepawake 0 autopoweroff 0 | ||
|
||
######## | ||
# | ||
# Energy Saver Preferences | ||
# | ||
######## | ||
|
||
###launchctl unload -w /System/Library/LaunchDaemons/com.apple.kextd.plist |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+58.7 KB
AutoImagrNBI/Images.xcassets/AppIcon.appiconset/AutoImagrNBI_256-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.84 KB
AutoImagrNBI/Images.xcassets/AppIcon.appiconset/AutoImagrNBI_32-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+194 KB
AutoImagrNBI/Images.xcassets/AppIcon.appiconset/AutoImagrNBI_512-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions
68
AutoImagrNBI/Images.xcassets/AppIcon.appiconset/Contents.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"size" : "16x16", | ||
"idiom" : "mac", | ||
"filename" : "AutoImagrNBI_16.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"size" : "16x16", | ||
"idiom" : "mac", | ||
"filename" : "AutoImagrNBI_32.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"size" : "32x32", | ||
"idiom" : "mac", | ||
"filename" : "AutoImagrNBI_32-1.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"size" : "32x32", | ||
"idiom" : "mac", | ||
"filename" : "AutoImagrNBI_64.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"size" : "128x128", | ||
"idiom" : "mac", | ||
"filename" : "AutoImagrNBI_128.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"size" : "128x128", | ||
"idiom" : "mac", | ||
"filename" : "AutoImagrNBI_256.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"size" : "256x256", | ||
"idiom" : "mac", | ||
"filename" : "AutoImagrNBI_256-1.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"size" : "256x256", | ||
"idiom" : "mac", | ||
"filename" : "AutoImagrNBI_512.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"size" : "512x512", | ||
"idiom" : "mac", | ||
"filename" : "AutoImagrNBI_512-1.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"size" : "512x512", | ||
"idiom" : "mac", | ||
"filename" : "AutoImagrNBI_1024.png", | ||
"scale" : "2x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Oops, something went wrong.