Sudo added to ifconfig to ensure it runs if debug not run as root

This commit is contained in:
nate 2016-03-30 19:51:09 -05:00
parent ec4d2d65a6
commit 5f7c11f495

View file

@ -118,7 +118,7 @@ function testNslookup {
### Check Pi internet connections ###
# Log the IP addresses of this Pi
IPADDR=$(ifconfig | perl -nle 's/dr:(\S+)/print $1/e')
IPADDR=$($SUDO ifconfig | perl -nle 's/dr:(\S+)/print $1/e')
echo "::: Writing local IPs to debug log"
echo "IP Addresses of this Pi:" >> $DEBUG_LOG
echo "$IPADDR" >> $DEBUG_LOG