diff --git a/demo/nginx/nginx_start.sh b/demo/nginx/nginx_start.sh index d3bef7a..aa43dcf 100644 --- a/demo/nginx/nginx_start.sh +++ b/demo/nginx/nginx_start.sh @@ -18,6 +18,7 @@ # You can download the latest version of this script from: # https://github.com/MiSTer-devel/Scripts_MiSTer/tree/master/demo/nginx +# Version 1.0.1 - 2019-05-19 - Added a prompt for opening MiSTer IP address with a web browser; added proper exit codes. # Version 1.0 - 2019-05-19 - First commit. @@ -78,8 +79,13 @@ mkdir -p /tmp/nginx-logs if ${NGINX_PATH}/nginx -c ${NGINX_PATH}/conf/nginx.conf -g "error_log /tmp/nginx-logs/error.log;" > /dev/null 2>&1 then echo "NGINX started" + echo "please open" + echo "http://$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')" + echo "with your web browser" + exit 0 else echo "NGINX not started" echo "please see" echo "/tmp/nginx-logs/error.log" + exit 1 fi \ No newline at end of file diff --git a/demo/nginx/nginx_stop.sh b/demo/nginx/nginx_stop.sh index 8049be4..2fe8cc5 100644 --- a/demo/nginx/nginx_stop.sh +++ b/demo/nginx/nginx_stop.sh @@ -18,6 +18,7 @@ # You can download the latest version of this script from: # https://github.com/MiSTer-devel/Scripts_MiSTer/tree/master/demo/nginx +# Version 1.0.1 - 2019-05-19 - Added proper exit codes. # Version 1.0 - 2019-05-19 - First commit. @@ -28,4 +29,4 @@ iptables -D INPUT -p tcp -m state --state NEW --dport 80 -j ACCEPT > /dev/null 2 killall nginx > /dev/null 2>&1 killall fcgiwrap > /dev/null 2>&1 rm /var/run/fcgiwrap.socket > /dev/null 2>&1 -echo "NGINX stopped" \ No newline at end of file +echo "NGINX stopped"