-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addes /usr/local/bin script and LaunchDaemon file
- Loading branch information
1 parent
47cdf3f
commit 95ae31e
Showing
3 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
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,18 @@ | ||
<?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>Label</key> | ||
<string>com.rummel.XProtect</string> | ||
<key>ProgramArguments</key> | ||
<array> | ||
<string>/usr/local/bin/backProtect.sh</string> | ||
</array> | ||
<key>RunAtLoad</key> | ||
<true/> | ||
<key>WatchPaths</key> | ||
<array> | ||
<string>/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.plist</string> | ||
</array> | ||
</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 |
---|---|---|
@@ -1,4 +1,12 @@ | ||
XProtectWatch | ||
============= | ||
|
||
This a tool to copy the XProtect.plist file whenever it changes via LaunchDaemon. This is not a managment system for XProtect. | ||
This a tool to copy the XProtect.plist file whenever it changes via LaunchDaemon. This is not a managment system for XProtect. | ||
|
||
Copy the files as needed: | ||
|
||
* /usr/local/bin/backProtect.sh | ||
* /Library/LaunchDaemons/com.stonyrivertech.XProtect.plist | ||
|
||
Be sure to chmod +x /usr/local/bin/backProtect.sh so it's an executable script and that the plist permisions are ```rw-r--r-- 1 root wheel``` | ||
|
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,11 @@ | ||
#!/bin/bash | ||
|
||
### Variables | ||
day=`date '+%Y-%m-%d'` | ||
sourceDir="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/" | ||
destineDir="/Users/Shared/XProtect/" | ||
file="XProtect.plist" | ||
|
||
|
||
[ ! -d "${destineDir}" ] && { mkdir "${destineDir}"; } | ||
cp "${sourceDir}${file}" "${destineDir}${day}-${file}" |