Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Implemented Launchd on the Mac OS Version

  • Loading branch information...
commit 52f4f989c0177abb5dff8f9f9bfaa27d3bea55e4 1 parent 9804330
Diego Torres authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 platform/darwin
View
10 platform/darwin
@@ -7,6 +7,16 @@
airport='/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport'
+function get_current_delay {
+ grep "<integer>.*<.integer>" /Library/LaunchDaemons/com.preyproject.PreyMac.plist | sed -e "s/^.*<integer/<integer/" | cut -f2 -d">"| cut -f1 -d"<"
+}
+
+function update_execution_delay {
+ sudo launchctl unload /Library/LaunchDaemons/com.preyproject.PreyMac.plist
+ sed -i -e "s/<integer>.*<\/integer>/<integer>$delay<\/integer>/" /Library/LaunchDaemons/com.preyproject.PreyMac.plist
+ sudo launchctl load /Library/LaunchDaemons/com.preyproject.PreyMac.plist
+}
+
function get_gateway_ip {
gateway_ip=`netstat -rn | grep default | cut -c20-35`
}
Please sign in to comment.
Something went wrong with that request. Please try again.