#!/bin/sh # Performing a DHCP renew loggerName=renewdhcplease.sh WLAN_CONFIG=/home/tool/config/wlan.json cat $WLAN_CONFIG | grep 'dhcp' > /dev/null 2>&1 if [ "$?" -eq "0" ]; then logger -s -t $loggerName "execute renewdhcplease.sh.. " PID=`ps | grep "[u]dhcpc -i tiwlan0" | awk '{print $1}'` logger -s -t $loggerName "pid udhcpc <$PID>" /bin/kill -SIGUSR1 $PID fi exit 0