I have worked out part of the issue. I can get the code to activate a shell script on the server side when an issue passes through a transition containing the scriptrunner post function. The code also send the reporter ID parameter to the shell script. However I can only get this to work when I manually enter the issue key. Can anyone assist with allowing the code to pull whatever issue key it is running on? Thank you!
Original code (manual key entry):
import com.atlassian.jira.component.ComponentAccessor
def issueId = "TES-123" // test parameter, change me later
def issueReporter = ComponentAccessor.getIssueManager().getIssueObject(issueId).reporter
def sout = new StringBuilder()
def serr = new StringBuilder()
def cmd = "/home/smithj/account.sh"
def proc = new ProcessBuilder(cmd, issueReporter.username).start()
proc.consumeProcessOutput(sout,serr)
proc.waitForOrKill(30000)
if(serr){
log.error "Error exeucting shell script with standard error output: \n $serr"
log.debug "Erroring shell script had standard output:\n $sout"
} else {
log.debug "Shell script executed succesfully with standard output:\n $sout"
}