Created
August 8, 2012 01:10
-
-
Save jkschoen/3291137 to your computer and use it in GitHub Desktop.
This is an example Perl script that can be used to work with the Script Launcher module in Maraschino.
This file contains 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/perl | |
$IP=@ARGV[0]; | |
$PORT=@ARGV[1]; | |
$SCRIPT_ID=@ARGV[2]; | |
$WEBROOT=@ARGV[3]; | |
$SLEEP_SECS=15; | |
if ($WEBROOT eq '') { | |
$URL="http://$IP:$PORT/xhr/script_launcher/script_status/$SCRIPT_ID"; | |
} | |
else { | |
$URL="http://$IP:$PORT/$WEBROOT/xhr/script_launcher/script_status/$SCRIPT_ID"; | |
} | |
print $URL; | |
$result = `curl -F 'status=Started Execution' $URL`; | |
sleep($SLEEP_SECS); | |
$result = `curl -F 'status=Next part of Script' $URL`; | |
sleep($SLEEP_SECS); | |
$result = `curl -F 'status=Doing more work' $URL`; | |
sleep($SLEEP_SECS); | |
$result = `curl -F 'status=Going to smoke' $URL`; | |
sleep($SLEEP_SECS); | |
$result = `curl -F 'status=Next part of Script' $URL`; | |
sleep($SLEEP_SECS); | |
$result = `curl -F 'status=Finished' $URL`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment