Skip to content

Instantly share code, notes, and snippets.

@atomotic
Forked from anonymous/h3-new-job
Last active September 23, 2015 18:58
Show Gist options
  • Save atomotic/600981 to your computer and use it in GitHub Desktop.
Save atomotic/600981 to your computer and use it in GitHub Desktop.
#!/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
curl -v -d "action=build" -k -u $USER:$PASSWORD --anyauth --location $HERITRIX/engine/job/$JOB
curl -v -d "action=launch" -k -u $USER:$PASSWORD --anyauth --location $HERITRIX/engine/job/$JOB
curl -v -d "action=unpause" -k -u $USER:$PASSWORD --anyauth --location $HERITRIX/engine/job/$JOB
#!/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