From 55ead3b6431430ff4f73f0df98fb926cbad4f89c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 23 Dec 2014 02:51:48 +0000 Subject: [PATCH] Updated interface to hide wget --- functions/fn_getquery | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/functions/fn_getquery b/functions/fn_getquery index 054f011a9..bfbbc124a 100644 --- a/functions/fn_getquery +++ b/functions/fn_getquery @@ -2,23 +2,27 @@ # LGSM fn_getquery function # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 011214 +# Version: 231214 +fn_dlgsquery(){ +cd "${rootdir}" +echo -e "downloading lgsm-default.cfg...\c" +wget --no-check-certificate /dev/null "http://danielgibbs.co.uk/dl/gsquery.py" 2>&1 | grep -F "HTTP" | grep -v "Moved Permanently" | cut -c45- +chmod +x gsquery.py +} + +echo "" echo "GameServerQuery" echo "============================" if [ -z ${autoinstall} ]; then while true; do read -p "Do you want to install GameServerQuery? [y/N]" yn case $yn in - [Yy]* ) echo ""; cd "${rootdir}"; wget --no-check-certificate -nv -N "http://danielgibbs.co.uk/dl/gsquery.py"; chmod +x gsquery.py; break;; + [Yy]* ) fn_dlgsquery;break;; [Nn]* ) echo ""; echo "Not installing GameServerQuery.";break;; * ) echo "Please answer yes or no.";; esac done else - echo "" - cd "${rootdir}" - wget --no-check-certificate -nv -N "http://danielgibbs.co.uk/dl/gsquery.py" - chmod +x gsquery.py -fi -echo "" \ No newline at end of file + fn_dlgsquery +fi \ No newline at end of file