From 084887f69ef9229da3c8e2d09c34839ca8180aef Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 25 Aug 2013 19:54:21 -0300 Subject: Adding config file --- scuttler | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'scuttler') diff --git a/scuttler b/scuttler index dbfe025..6d67e5f 100755 --- a/scuttler +++ b/scuttler @@ -3,11 +3,13 @@ # Download all links from a Semantic Scuttle instance. # +# Configuration +source config || exit 1 + +# Other parameters BASEDIR=/var/sites/links SCUTTLEDIR=`basename $( find ${BASEDIR} -maxdepth 1 -iname "SemanticScuttle-*" | head -n 1 )` CONFIGFILE=${BASEDIR}/${SCUTTLEDIR}/data/config.php -MIRRORDIR=${BASEDIR}/mirrors -TMPDIR=/tmp # Load functions source lib/httracker/functions || exit 1 @@ -30,13 +32,15 @@ sqlquery() { --execute="${1}" } -# grabs URLs from db -tmpfile=`mktemp -p ${TMPDIR}` -chown links.links ${tmpfile} -chmod 600 ${tmpfile} -sqlquery "select bAddress from sc_bookmarks;" > ${tmpfile} +# Grab URLs from db +URLS=`mktemp -p ${TMP}` +chown links.links ${URLS} +chmod 600 ${URLS} +sqlquery "select bAddress from sc_bookmarks;" > ${URLS} +# Prepare and download httracker_target_single httracker_get_single -rm ${tmpfile} +# Cleanup +rm -rf $TMP -- cgit v1.2.3