[SOLVED]: Run Script Action not working

Posted on
Sun Jul 27, 2014 8:00 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

[SOLVED]: Run Script Action not working

jay (support) wrote:
jheddings wrote:
Two quick requests on using embedded scripts...
1. Embedded Shell Scripts - just like the other types, but an embedded shell script would be nice. The Python subprocess library is fine for quick one-liners, but it is kind of messy for longer shell scripts. And some things are just easier in a shell script than Python...



Jay,

I haven't been able to get the Server Actions->Script and File Actions->Run Shell Script action to work.

I have the script defined as: /Users/Benjamin/dropbox/HomeAutomation/lockdown/run_warning1.command
But the UI is showing the script as: run script: /users/benjamin/dropbox/homeautomation/lockdown/run_warning1.command

Please note the difference in cases.

And the log file is showing:

Schedule First Warning for Computer Lockdown
Action Collection Error Script file doesn't exist: /Users/Benjamin/dropbox/HomeAutomation/lockdown/run_warning1.command

But,

nerv:dropbox Benjamin$ ls -l /Users/Benjamin/dropbox/HomeAutomation/lockdown/run_warning1.command
-rwxr-xr-x@ 1 Benjamin staff 166 Jul 27 21:43 /Users/Benjamin/dropbox/HomeAutomation/lockdown/run_warning1.command
nerv:dropbox Benjamin$

It's clearly there....

Any ideas?

- Benjamin

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Mon Jul 28, 2014 9:48 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Run Script Action not working

bschollnick2 wrote:
I have the script defined as: /Users/Benjamin/dropbox/HomeAutomation/lockdown/run_warning1.command
But the UI is showing the script as: run script: /users/benjamin/dropbox/homeautomation/lockdown/run_warning1.command


In the action description (as opposed to in the actual config dialog)? The descriptions are automatically lower-cased so that's where the difference is.

bschollnick2 wrote:
And the log file is showing:

Schedule First Warning for Computer Lockdown
Action Collection Error Script file doesn't exist: /Users/Benjamin/dropbox/HomeAutomation/lockdown/run_warning1.command

But,

nerv:dropbox Benjamin$ ls -l /Users/Benjamin/dropbox/HomeAutomation/lockdown/run_warning1.command
-rwxr-xr-x@ 1 Benjamin staff 166 Jul 27 21:43 /Users/Benjamin/dropbox/HomeAutomation/lockdown/run_warning1.command
nerv:dropbox Benjamin$


Hmmm, not sure. I do see in the code that if it can't get the variable configured as the destination for the output it would also throw that error (I'll fix that in an upcoming release). Are you sure the variable you configured as the output still exists?

[MODERATOR NOTE] moved to appropriate forum.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Jul 28, 2014 11:05 am
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Run Script Action not working

jay (support) wrote:
bschollnick2 wrote:
I have the script defined as: /Users/Benjamin/dropbox/HomeAutomation/lockdown/run_warning1.command
But the UI is showing the script as: run script: /users/benjamin/dropbox/homeautomation/lockdown/run_warning1.command


Hmmm, not sure. I do see in the code that if it can't get the variable configured as the destination for the output it would also throw that error (I'll fix that in an upcoming release). Are you sure the variable you configured as the output still exists?


That was it. The variable wasn't set properly.

I thank you, now I have automated the shut down of the kids internet, and the resumption of it in the next morning. Very "straight forward" in a windows manner. Using Python, WinRM, some shell commands, and sprinkle in some Indigo for Scheduling purposes.

[MODERATOR NOTE] moved to appropriate forum.[/quote]

I have to say, the structure of the new forums makes it hard to find the right place to post questions in. Or at least, I end up hunting a heck of a lot more to find the right place.

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Mon Jul 28, 2014 11:45 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Run Script Action not working

bschollnick2 wrote:
I have to say, the structure of the new forums makes it hard to find the right place to post questions in. Or at least, I end up hunting a heck of a lot more to find the right place.


It's just new - once you get used to it we think it'll be better. In any event, the previous topic where this was posted was under "Feature Requests" which this clearly isn't...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests