Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bowie

macrumors newbie
Original poster
Oct 16, 2008
1
0
Hi I am a newbie to scripting and automator - so you are warned :D

Got a NAS that I want to be able to restart by using an automator workflow that is executing my shell script.

Will use wget in shell script for that. Wget is installed and is working fine from terminal.

Created my shell script "restartmynas.sh" in pico in terminal. Did a chmod +x on the shell script and copied it to usr/local/bin which is in my PATH. Tested from terminal - great it works.

Code in shell script:
#!/bin/bash

/usr/local/bin/wget -q -O /dev/null --http-user=admin --http-password=mypsw --post-data="powerAction=1" http://ipofnas/cgi/power/powerHandler.cgi

exit


Right - went into automator. Choose "run shell script" and entered "restartmynas.sh". Ran the automator workflow and it fails .... arrrgrggghhh :confused:. Damn why? Please help anybody.

What am I doing wrong. Must have todo with the wget since when I am executing a "simple" shell script with lets say "ls" it works fine.

Any help appreciated
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.