From 63ee798f1f6c6a58165f328027cc3f427535c447 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 25 Aug 2013 19:58:06 -0300 Subject: Moving functions to lib --- lib/httracker/functions | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib') diff --git a/lib/httracker/functions b/lib/httracker/functions index 0d3293a..ea9a7fa 100644 --- a/lib/httracker/functions +++ b/lib/httracker/functions @@ -61,3 +61,16 @@ function httracker_target_single { target=${MIRRORDIR}/${year}/${month} sudo -u links mkdir -p ${target} } + +function httracker_scuttle_config() { + grep ${1} ${CONFIGFILE} | sed -e s/\[^\'\]\*\'// -e s/\'\.\*\$// +} + +httracker_sqlquery() { + mysql --skip-column-names --batch \ + --user=${dbuser} \ + --password=${dbpass} \ + --database=${dbname} \ + --host=${dbhost} \ + --execute="${1}" +} -- cgit v1.2.3