Skip to content

Commit

Permalink
Company header info for watchProtect
Browse files Browse the repository at this point in the history
  • Loading branch information
justinrummel committed Feb 21, 2013
1 parent ed11bf4 commit b8664df
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions usr/local/bin/watchProtect.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
#!/bin/bash

### Variables
day=`date '+%Y-%m-%d_%H-%M-%S'`
# This script was developed BY Stony River Technologies (SRT)
# ALL scripts are covered by SRT's Licnese found at:
# https://raw.github.com/stonyrivertech/SRT-Public/master/LICENSE

# Created by Justin Rummel
# Version 1.0.0 - 2/20/2013

# Modified by
# Version

### Description
# Goal is to copy XProtect.plist files to your local /Users/Shared/XProtect folder so you can review what has changed
# when apple updates their XProtect information. This is not a management system.

# Base Variables that I use for all scripts. Creates Log files and sets date/time info
declare -x SCRIPTPATH="${0}"
declare -x RUNDIRECTORY="${0%/*}"
declare -x SCRIPTNAME="${0##*/}"

logtag="${0##*/}"
debug_log="disabled"
logDate=`date +"Y.m.d"`
logDateTime=`date +"Y-m-d_H.M.S"`
log_dir="/Library/Logs/${logtag}"
LogFile="${logtag}-${logDate}.log"

# Script Variables
sourceDir="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/"
destineDir="/Users/Shared/XProtect/"
XPath=".version/"
Expand All @@ -12,7 +37,5 @@ version=`/usr/libexec/PlistBuddy -c "print :Version" /System/Library/CoreService
[ ! -d "${destineDir}${XPath}" ] && { mkdir "${destineDir}${XPath}"; }
[ ! -e "${destineDir}${XPath}${version}" ] && {
touch "${destineDir}${XPath}${version}"
cp "${sourceDir}${file}" "${destineDir}${day}-${file}"
cp "${sourceDir}${file}" "${destineDir}${logDateTime}-${file}"
}

`

0 comments on commit b8664df

Please sign in to comment.