3 # NOTE: Must be an absolute path to guarantee it is read.
4 INSTALLPATH=/usr/share/monitor/
5 # Generate an 'sh' style file full of variables in monitor.conf
6 $INSTALLPATH/shconfig.py > $INSTALLPATH/monitorconfig.sh
7 source $INSTALLPATH/monitorconfig.sh
8 cd ${MONITOR_SCRIPT_ROOT}
10 DATE=`date +%Y-%m-%d-%T`
13 AGENT=`ps ax | grep ssh-agent | grep -v grep`
15 if [ -z "$AGENT" ] ; then
16 echo "starting ssh agent"
17 # if no agent is running, set it up.
18 ssh-agent > ${MONITOR_SCRIPT_ROOT}/agent.sh
19 source ${MONITOR_SCRIPT_ROOT}/agent.sh
20 ssh-add /etc/planetlab/debug_ssh_key.rsa
21 ssh-add /etc/planetlab/root_ssh_key.rsa
23 #TODO: should add a call to ssh-add -l to check if the keys are loaded or not.
24 source ${MONITOR_SCRIPT_ROOT}/agent.sh