I have to remotely connect to a gateway (working on Linux platform), inside which I have couple of executable files (signingModule.sh
and taxModule.sh
).
Now I want to write one script in my desktop which will connect to that gateway and run signingModule.sh
and taxModule.sh
in two different terminals.
I have written below code:
ssh [email protected] #to connect to gateway
sleep 5
cd /opt/swfiscal/signingModule #path of both modules
./signingModule #executable
but through this code I am able to connect my gateway but after connecting to gateway nothing is happening.
2nd code:
source configPath # file where i have given path of both the modules(configPath is placed in local machine)
cd $FCM_SCRIPTS # variable in which i have stored the path of modules
ssh [email protected] 'sh -' < signingModule #to connect and run one module (signingModule is placed in remote machine)
As an output of this I am getting: source: configPath: file not found
Please help me working this out. Thanks in advance.
Note:
- I can copy paste my files in that gateway if required.
- Gnome-Terminal or any other alternatives of this is not working in my gateway.
- I have to run all modules (signing and tax) in different terminal coz my other application will work only when these two modules are up. so to make them run simultaneously we have to run them in different tab or terminal.
- I have to write a script in my local machine which will run both modules (signing and tax) which are placed in remote gateway. So i want to run that script in my local machine which is gonna hit gateway's modules.
configPath
in the local or the remote machine? Is it in the directory you run the script from? Where isstartSigningModule
? Local or remote? We need to know what has to run on the local machine and what has to run in the remote in order to help you.