Hi I am a newbie to scripting and automator - so you are warned 
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
. 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
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
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