-
-
Save atomotic/600981 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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