#!/bin/bash
# Copyright 2013 Monterey Bay Aquarium Research Institute, all rights reserved.
echo Turn off WiFi radio
# Get power port and comm port from configuration
radio=wifi
powerSerial=`python /home/hotspot/smc-script/modemConfig.py $MODEM_CONFIG_FILE $radio`
if [ $? != 0 ]; then
   echo $powerSerial
   echo Could not get configuration for $radio radio
   exit 1
fi

# Get power port
powerPort=`echo $powerSerial | awk '{print $1}'`

/home/smc/bin/SetPowerSwitch $powerPort 0

ifdown eth0
killall dhclient

