Skip to content

Instantly share code, notes, and snippets.

@jkschoen
Created August 8, 2012 01:10
Show Gist options
  • Save jkschoen/3291137 to your computer and use it in GitHub Desktop.
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.
#!/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