I have what I thought would be a simple task, but I'm running into problems. I have a shell script on my iMac and it interacts with the Synology Surveillance Station API. If I run the scripts from a Terminal command line everything works fine. I need to run these scripts from within Haiku Helper (triggered by events on my OmniPro II). I didn't see anything in the documentation about directly running shell scripts, but I did see that HH can run an Apple Script, and Apple Script has a "do shell script" command.
Unfortunately when I run my Apple Script from within the script editor for testing, I can see that it's executing my script (various tmp files that I expect to find are getting created, so I know it's running), but somewhere inside the shell script it's failing, because I see no effect in Surveillance Station like I do when I run the script from the Terminal command line. The Result pane in the Script Editor isn't capturing any error information, so I can't tell what's failing.
Is there a better or more direct way to run a shell script from HH?
My shell scripts are basically running wget to send Surveillance Station the commands I want, so I suppose I could potentially use XMLHttpRequest() in HH to talk to the Surveillance Station API, but their API relies on cookies to communicate between HTTP requests, and I'm not sure how HH will handle that. Using wget I can stash the cookies from one call and load them again for the next call.
Unfortunately when I run my Apple Script from within the script editor for testing, I can see that it's executing my script (various tmp files that I expect to find are getting created, so I know it's running), but somewhere inside the shell script it's failing, because I see no effect in Surveillance Station like I do when I run the script from the Terminal command line. The Result pane in the Script Editor isn't capturing any error information, so I can't tell what's failing.
Is there a better or more direct way to run a shell script from HH?
My shell scripts are basically running wget to send Surveillance Station the commands I want, so I suppose I could potentially use XMLHttpRequest() in HH to talk to the Surveillance Station API, but their API relies on cookies to communicate between HTTP requests, and I'm not sure how HH will handle that. Using wget I can stash the cookies from one call and load them again for the next call.