From 03eccdd8b4fee87a31d8c76633e5e64ba3156b09 Mon Sep 17 00:00:00 2001 From: snipem Date: Sun, 14 Sep 2014 15:05:03 +0200 Subject: [PATCH] Set 127.0.0.1 as routing target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setting the localhost is better instead of fetching the current local IP address. The address may change or may be set dynamically depending on the network you’re in. --- procrast | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/procrast b/procrast index 4786882..9361517 100755 --- a/procrast +++ b/procrast @@ -1,9 +1,5 @@ #!/bin/sh -get_current_ip() { - echo $(ifconfig | grep 'inet '| grep -v '127.0.0.1' | cut -d' ' -f2 | awk '{ print $1}') -} - create_host_line() { echo "$1 $2 # procrast" } @@ -26,7 +22,7 @@ add_host() { local HOST=$1 if [ "$#" == "1" ];then - local IP=`get_current_ip` + local IP=127.0.0.1 else local IP=$2 fi