From 4df66961d9b755076157ad1d147e118bb504f745 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Mon, 15 Sep 2014 19:01:15 +0200 Subject: [PATCH] TOR_CHK_URL modified at install time --- INSTALL.sh | 10 ++++++++-- web/Obj/curl-de-brisk.phh | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/INSTALL.sh b/INSTALL.sh index e8de2f7..9baba5f 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -9,6 +9,7 @@ apache_conf="/etc/apache2/sites-available/default" # brisk_debug="0xffff" web_path="/home/nastasi/web/curl-de-sacccc" web_url="http://localhost/curl-de-sac" +tor_chk_url="http://localhost/curl-de-sac/test/tor_mock.php" dbg_level=998 # ftok_path="/home/nastasi/brisk-priv/ftok/brisk" # proxy_path="/home/nastasi/brisk-priv/proxy/brisk" @@ -26,7 +27,7 @@ function usage () { echo "$1 chk - run lintian on all ph* files." # echo "$1 pkg - build brisk packages." - echo "$1 [-w ] [-f ] [-p ]" # [-W] [-n 3|5] [-t <(n>=4)>] [-T ] [-G ] [-A ] [-a ] [-U ] [-u ] [-d ] [-k ] [-l ] [-y ] [-P ] [-x]" + echo "$1 [-w ] [-f ] [-p ] [-t ]" # [-W] [-n 3|5] [-t <(n>=4)>] [-T ] [-G ] [-A ] [-a ] [-U ] [-u ] [-d ] [-k ] [-l ] [-y ] [-P ] [-x]" # echo "$1 [-W] [-n 3|5] [-t <(n>=4)>] [-T ] [-G ] [-A ] [-a ] [-f ] [-p ] [-U ] [-u ] [-d ] [-w ] [-k ] [-l ] [-y ] [-P ] [-x]" echo "$1 [-w ]" echo " -h this help" @@ -42,6 +43,7 @@ function usage () { echo " -d set debug level - def. $dbg_level" echo " -w dir where place the web tree - def. \"$web_path\"" echo " -U web url to retrieve test pages - def. \"$web_url\"" + echo " -t tor chk url - def. \"$tor_chk_url\"" # echo " -k dir where place ftok files - def. \"$ftok_path\"" # echo " -l dir where save logs - def. \"$legal_path\"" # echo " -y dir where place proxy files - def. \"$proxy_path\"" @@ -150,6 +152,7 @@ while [ $# -gt 0 ]; do -d*) dbg_level="$(get_param "-d" "$1" "$2")"; sh=$?;; -w*) web_path="$(get_param "-w" "$1" "$2")"; sh=$?;; -U*) web_url="$(get_param "-U" "$1" "$2")" ; sh=$?;; + -t*) tor_chk_url="$(get_param "-t" "$1" "$2")" ; sh=$?;; # -k*) ftok_path="$(get_param "-k" "$1" "$2")"; sh=$?;; # -y*) proxy_path="$(get_param "-y" "$1" "$2")"; sh=$?;; # -P*) prefix_path="$(get_param "-P" "$1" "$2")"; sh=$?;; @@ -186,6 +189,8 @@ echo " outconf: \"$outconf\"" echo " dbg_level: $dbg_level" echo " web_path: \"$web_path\"" echo " web_url: \"$web_url\"" +echo " tor_chk_url: \"$tor_chk_url\"" + # echo " ftok_path: \"$ftok_path\"" # echo " legal_path: \"$legal_path\"" # echo " proxy_path: \"$proxy_path\"" @@ -210,6 +215,7 @@ if [ ! -z "$outconf" ]; then echo "dbg_level=$dbg_level" echo "web_path=\"$web_path\"" echo "web_url=\"$web_url\"" + echo "tor_chk_url=\"$tor_chk_url\"" # echo "ftok_path=\"$ftok_path\"" # echo "proxy_path=\"$proxy_path\"" # echo "legal_path=\"$legal_path\"" @@ -296,7 +302,7 @@ fi # sed -i "s/^var G_send_time *= *[0-9]\+/var G_send_time = $send_time/g" $(find ${web_path} -type f -name '*.js' -exec grep -l '^var G_send_time *= *[0-9]\+' {} \;) # # .ph[pho] substitutions -sed -i "s@^define *( *'WEB_URL', *'[^']\+' *)@define('WEB_URL', '$web_url')@g;s@define *( *'DBG_LEVEL', *[0-9]\+ *)@define('DBG_LEVEL', $dbg_level)@g" $(find ${web_path} -type f -name '*.ph*') +sed -i "s@^define *( *'WEB_URL', *'[^']\+' *)@define('WEB_URL', '$web_url')@g;s@define *( *'DBG_LEVEL', *[0-9]\+ *)@define('DBG_LEVEL', $dbg_level)@g;s@define *( *'TOR_CHK_URL', *'[^']\+' *)@define('TOR_CHK_URL', '$tor_chk_url')@g" $(find ${web_path} -type f -name '*.ph*') # sed -i "s/define *( *'BIN5_PLAYERS_N', *[0-9]\+ *)/define('BIN5_PLAYERS_N', $players_n)/g" $(find ${web_path} -type f -name '*.ph*' -exec grep -l "define *( *'BIN5_PLAYERS_N', *[0-9]\+ *)" {} \;) diff --git a/web/Obj/curl-de-brisk.phh b/web/Obj/curl-de-brisk.phh index 9fc5f66..ec1d3b1 100755 --- a/web/Obj/curl-de-brisk.phh +++ b/web/Obj/curl-de-brisk.phh @@ -2,7 +2,7 @@ require_once('Obj/curl-de-sac.phh'); -define('TOR_CHK_URL', 'http://localhost/curl-de-sac/test/tor_mock.php'); +define('TOR_CHK_URL', 'http://localhost/curl-de-sac/test/tor_mock.ppp'); class tor_chk_cmd extends CDS_cmd { var $ctx; -- 2.17.1