diff --git a/menubox.png b/menubox.png index 76a3ba4..90cc688 100644 Binary files a/menubox.png and b/menubox.png differ diff --git a/menubox.sh b/menubox.sh index 3a54f33..a41aa41 100644 --- a/menubox.sh +++ b/menubox.sh @@ -19,9 +19,6 @@ searchconfig="$DIR/$searchconfig" filename_conf="work_config.txt" filename_temp="work_temp.txt" -myip=$(ifconfig | grep 'inet ' | grep -v 127.0.0 | cut -d " " -f 12 | cut -d ":" -f 2 ) -myport=$( grep "web_server_port" config.py | cut -d "=" -f 2 | cut -d "#" -f 1 | awk '{$1=$1};1' ) - #------------------------------------------------------------------------------ function do_anykey () { @@ -49,6 +46,8 @@ function init_status () WEB_2="webserver.py in background" else webserver_pid=$( pgrep -f webserver.py ) + myip=$(ifconfig | grep 'inet ' | grep -v 127.0.0 | cut -d " " -f 12 | cut -d ":" -f 2 ) + myport=$( grep "web_server_port" config.py | cut -d "=" -f 2 | cut -d "#" -f 1 | awk '{$1=$1};1' ) WEB_1="STOP" WEB_2="webserver.py - PID is $webserver_pid http://$myip:$myport" fi @@ -684,8 +683,7 @@ function do_main_menu () cd $DIR init_status temp="$(/opt/vc/bin/vcgencmd measure_temp)" - myip=$(ifconfig | grep 'inet ' | grep -v 127.0.0 | cut -d " " -f 12 | cut -d ":" -f 2 ) - myport=$( grep "web_server_port" config.py | cut -d "=" -f 2 | cut -d "#" -f 1 | awk '{$1=$1};1' ) + cd $DIR SELECTION=$(whiptail --title "Speed Camera Main Menu" \ --menu "Arrow/Enter Selects or Tab Key" 0 0 0 \