Skip to content

Instantly share code, notes, and snippets.

Created September 28, 2010 13:19
Show Gist options
  • Save anonymous/600969 to your computer and use it in GitHub Desktop.
Save anonymous/600969 to your computer and use it in GitHub Desktop.
heritrix3 new job
#!/bin/bash
. heritrix.conf
if [ -z "$1" ] || [ -z "$2" ]; then
echo usage: $0 jobname seedsfile
exit
fi
JOB=$1
SEEDS=$2
curl --silent -d "copyTo=$JOB" -k -u $USER:$PASSWORD \
--anyauth --location -H "Accept: application/xml" \
$HERITRIX/engine/job/$PROFILE \
| xml sel -t -v "concat('job: ', /job/shortName)" -n \
-v "concat('status: ', /job/statusDescription)" -n \
-v "concat('configurl: ', /job/primaryConfigUrl)"
curl -T $SEEDS -k -u $USER:$PASSWORD --anyauth \
--location $HERITRIX/engine/job/$JOB/jobdir/seeds.txt
#!/bin/bash
USER=admin
PASSWORD=password
HERITRIX=https://localhost:8443
PROFILE=default-profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment