diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-08-25 19:58:06 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-08-25 19:58:06 -0300 |
commit | 63ee798f1f6c6a58165f328027cc3f427535c447 (patch) | |
tree | 6df949e694d559ccbff2179acbca29bdf033f83e /scuttler | |
parent | 084887f69ef9229da3c8e2d09c34839ca8180aef (diff) | |
download | httruta-63ee798f1f6c6a58165f328027cc3f427535c447.tar.gz httruta-63ee798f1f6c6a58165f328027cc3f427535c447.tar.bz2 |
Moving functions to lib
Diffstat (limited to 'scuttler')
-rwxr-xr-x | scuttler | 23 |
1 files changed, 5 insertions, 18 deletions
@@ -14,29 +14,16 @@ CONFIGFILE=${BASEDIR}/${SCUTTLEDIR}/data/config.php # Load functions source lib/httracker/functions || exit 1 -getconf() { - grep ${1} ${CONFIGFILE} | sed -e s/\[^\'\]\*\'// -e s/\'\.\*\$// -} - -dbuser=`getconf dbuser` -dbpass=`getconf dbpass` -dbname=`getconf dbname` -dbhost=`getconf dbhost` - -sqlquery() { - mysql --skip-column-names --batch \ - --user=${dbuser} \ - --password=${dbpass} \ - --database=${dbname} \ - --host=${dbhost} \ - --execute="${1}" -} +dbuser=`httracker_scuttle_config dbuser` +dbpass=`httracker_scuttle_config dbpass` +dbname=`httracker_scuttle_config dbname` +dbhost=`httracker_scuttle_config dbhost` # Grab URLs from db URLS=`mktemp -p ${TMP}` chown links.links ${URLS} chmod 600 ${URLS} -sqlquery "select bAddress from sc_bookmarks;" > ${URLS} +httracker_sqlquery "select bAddress from sc_bookmarks;" > ${URLS} # Prepare and download httracker_target_single |