root/honeyclient/tags/exp/DOWN1-kindlund-simpler_agent/bin/bootstrap_agent.sh

Revision 1449, 1.1 kB (checked in by kindlund, 9 months ago)

Improved cleanup code.

  • Property svn:executable set to *
  • Property svn:keywords set to Id "$file"
Line 
1 #!/bin/bash
2
3 # $Id$
4
5 echo "Starting up Agent - (Hit CTRL-C multiple times to exit.)"
6
7 # Remove all old /tmp/* entries.
8 rm /tmp/* > /dev/null 2>&1
9
10 # Remove any old capture logs entries.
11 rm -rf ~/honeyclient/thirdparty/capture-mod/logs
12
13 # Determine the IP address of the VM running.
14 IP=$(/cygdrive/c/Program\ Files/VMware/VMware\ Tools/VMip.exe -get)
15 echo "IP = $IP"
16
17 # Wait until the VM has a valid IP address.
18 while [ $IP = "0.0.0.0" ] ; do
19     /cygdrive/c/Program\ Files/VMware/VMware\ Tools/VMip.exe -release
20     /cygdrive/c/Program\ Files/VMware/VMware\ Tools/VMip.exe -renew
21     IP=$(/cygdrive/c/Program\ Files/VMware/VMware\ Tools/VMip.exe -get)
22     echo "IP = $IP"
23     sleep 1
24 done
25
26 # Ping a remote site, to test for connectivity (optional).
27 /cygdrive/c/windows/system32/ping.exe pingu.honeyclient.org
28
29 # Change to the honeyclient directory.
30 cd ~/honeyclient
31
32 # Perform an SVN update (optional).
33 svn update
34
35 # Start up the realtime integrity checker.
36 ~/honeyclient/thirdparty/capture-mod/CaptureBAT.exe -c -l "C:\cygwin\tmp\realtime-changes.txt"&
37
38 # Start the Agent code.
39 perl -Ilib bin/StartAgent.pl
Note: See TracBrowser for help on using the browser.