diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-08-25 19:54:21 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-08-25 19:54:21 -0300 |
commit | 084887f69ef9229da3c8e2d09c34839ca8180aef (patch) | |
tree | 76276a1942e96d9d310914541141f63d061639ee /scuttler | |
parent | 489623ef3069b479788f91a6935b8061b9aab2ce (diff) | |
download | httruta-084887f69ef9229da3c8e2d09c34839ca8180aef.tar.gz httruta-084887f69ef9229da3c8e2d09c34839ca8180aef.tar.bz2 |
Adding config file
Diffstat (limited to 'scuttler')
-rwxr-xr-x | scuttler | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -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 |