Skip to content

Instantly share code, notes, and snippets.

@jkschoen
Created August 7, 2012 02:59
Show Gist options
  • Save jkschoen/3280945 to your computer and use it in GitHub Desktop.
Save jkschoen/3280945 to your computer and use it in GitHub Desktop.
This is an example Bash script that can be used to work with the Script Launcher module in Maraschino.
#!/bin/bash
IP=$1
PORT=$2
SCRIPT_ID=$3
WEBROOT=$4
SLEEP_SECS=15
if [ -z "$WEBROOT" ]; then
URL="http://"$IP":"$PORT"/xhr/script_launcher/script_status/"$SCRIPT_ID
else
URL="http://"$IP":"$PORT"/"$WEBROOT"/xhr/script_launcher/script_status/"$SCRIPT_ID
fi
curl -F 'status=Started Execution' $URL
sleep $SLEEP_SECS
curl -F 'status=Next part of Script' $URL
sleep $SLEEP_SECS
curl -F 'status=Doing more work' $URL
sleep $SLEEP_SECS
curl -F 'status=Going to smoke' $URL
sleep $SLEEP_SECS
curl -F 'status=Next part of Script' $URL
sleep $SLEEP_SECS
curl -F 'status=Finished' $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment