Permalink
Browse files

Implemented Launchd on the Mac OS Version

  • Loading branch information...
1 parent 9804330 commit 52f4f989c0177abb5dff8f9f9bfaa27d3bea55e4 Diego Torres committed Feb 19, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 platform/darwin
View
@@ -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`
}

0 comments on commit 52f4f98

Please sign in to comment.