Skip to content

Instantly share code, notes, and snippets.

@acidprime
Created January 9, 2012 00:45
Show Gist options
  • Save acidprime/1580304 to your computer and use it in GitHub Desktop.
Save acidprime/1580304 to your computer and use it in GitHub Desktop.
10.5 Generate Blank Auto Server Setup
#!/bin/bash
declare -x plistbuddy="/usr/libexec/PlistBuddy"
declare PLIST="$1"
# AdminUser
$plistbuddy -c "Add :AdminUser dict" "$PLIST"
$plistbuddy -c "Add :AdminUser:exists bool" "$PLIST"
$plistbuddy -c "Add :AdminUser:name string" "$PLIST"
$plistbuddy -c "Add :AdminUser:password string" "$PLIST"
$plistbuddy -c "Add :AdminUser:realname string" "$PLIST"
$plistbuddy -c "Add :AdminUser:uid string" "$PLIST"
# Bonjour
$plistbuddy -c "Add :Bonjour dict" "$PLIST"
$plistbuddy -c "Add :Bonjour:BonjourEnabled bool" "$PLIST"
$plistbuddy -c "Add :Bonjour:BonjourName string" "$PLIST"
# ComputerName
$plistbuddy -c "Add :ComputerName string" "$PLIST"
# DS
$plistbuddy -c "Add :DS dict" "$PLIST"
$plistbuddy -c "Add :DS:DSType string" "$PLIST"
# DefaultGroupName
$plistbuddy -c "Add :DefaultGroupName dict" "$PLIST"
$plistbuddy -c "Add :DefaultGroupName:longname string" "$PLIST"
$plistbuddy -c "Add :DefaultGroupName:shortname string" "$PLIST"
# EnableARD
$plistbuddy -c "Add :EnableARD bool" "$PLIST"
# HostName
$plistbuddy -c "Add :HostName string" "$PLIST"
# InstallLanguage
$plistbuddy -c "Add :InstallLanguage string" "$PLIST"
# Keyboard
$plistbuddy -c "Add :Keyboard dict" "$PLIST"
$plistbuddy -c "Add :Keyboard:DefaultFormat string" "$PLIST"
$plistbuddy -c "Add :Keyboard:DefaultScript string" "$PLIST"
$plistbuddy -c "Add :Keyboard:ResName string" "$PLIST"
$plistbuddy -c "Add :Keyboard:ScriptID integer" "$PLIST"
$plistbuddy -c "Add :Keyboard:kbResID integer" "$PLIST"
# NetworkInterfaces
$plistbuddy -c "Add :NetworkInterfaces array" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:ActiveAT bool" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:ActiveTCPIP bool" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:DNSDomains array" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:DNSServers array" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:DeviceName string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:EthernetAddress string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:IPv6 dict" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:IPv6:IPv6Type string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:PortName string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:Settings dict" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:Settings:IPAddress string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:Settings:Router string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:Settings:SubnetMask string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:0:Settings:Type string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:ActiveAT bool" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:ActiveTCPIP bool" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:DNSDomains array" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:DNSServers array" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:DeviceName string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:EthernetAddress string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:IPv6 dict" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:IPv6:IPv6Type string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:PortName string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:Settings dict" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:Settings:IPAddress string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:Settings:Router string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:Settings:SubnetMask string" "$PLIST"
$plistbuddy -c "Add :NetworkInterfaces:1:Settings:Type string" "$PLIST"
# PrimaryLanguage
$plistbuddy -c "Add :PrimaryLanguage string" "$PLIST"
# SerialNumber
$plistbuddy -c "Add :SerialNumber string" "$PLIST"
# ServiceNTP
$plistbuddy -c "Add :ServiceNTP dict" "$PLIST"
$plistbuddy -c "Add :ServiceNTP:HostNTP bool" "$PLIST"
$plistbuddy -c "Add :ServiceNTP:HostNTPServer string" "$PLIST"
$plistbuddy -c "Add :ServiceNTP:UseNTP bool" "$PLIST"
# TimeZone
$plistbuddy -c "Add :TimeZone string" "$PLIST"
# VersionNumber
$plistbuddy -c "Add :VersionNumber integer" "$PLIST"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment