I am running in to a roadblock with a script which I have written to automate some of the steps in our Entourage to GMail conversion process. This script is being run via a policy in Self Service, which is when I started having issues killing off a process (BigHonkingText) which I am running to notify the user of the script's status.
When I ran the script locally as root with "killall BigHonkingText" to kill off an instance of BigHonkingText set to "-p 0" (as I want it to run for the entirety of the run of an AppleScript via osascript) it worked just fine. Once I put the script up in a policy and ran it via Self Service, the instance of BigHonkingText would not longer die when the "killall BigHonkingText" command was run.
I tried working around it by gathering the PID of BigHonkingText, and then "kill -9 "$THEPROC"", however, it still won't die.
Here is the snippet of the code which I am having trouble with (please note this is not the whole script - everything else works correctly):
THEPROC=pgrep BigHonkingText | awk '{print $1}'
/usr/local/bin/BigHonkingText -m -b blue -p 0 -w 90% -h 20% "RUNNING ENTOURAGE EXPORT - PLEASE DO NOT TOUCH YOUR COMPUTER" &
osascript /Users/$THEUSER/GMail Conversion Folder/Scripts/BPS_Export_Entourage_Mail_10212013.scptd
kill -9 "$THEPROC"
Any ideas are much appreciated.