I created a windows batch file with the following content:
plink -batch PuttySaveSessionName -pw thePassword "bash stop.sh"
stop.sh is located in the home directory of the linux machine I log in to, and has the following content:
echo "starting..."
cd //path_to_jboss_dir/jboss/bin
./spcrun.stop
echo "finished"
If I execute the Windows batch file I receive the following output and the server is still running:
starting...
finished
JAVA_HOME system property is undefined.
Please define JAVA_HOME and start JBoss again.
If I use putty to log in, and follow the commands above, the server shuts down.
I need the same behavior using pLink from Windows. Any ideas on what the problem is?