LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   script for replacing files and stop/starting proces (https://www.linuxquestions.org/questions/linux-software-2/script-for-replacing-files-and-stop-starting-proces-925422/)

rytec 01-24-2012 04:59 AM

script for replacing files and stop/starting proces
 
I'm wondering if it is possible to create a script which can be run by a simple commando in Ubuntu server commandline which will stop a proces, overwrites some files, start the proces again on it's own pc.

But is it also possible to stop a proces on another linux box by connecting to it with telnet or ssh from this ubuntu server, overwrite some files and start the proces again? everything is in the internal network.

chrism01 01-24-2012 10:43 PM

These are certainly both possible, but you'll have to give us a lot more info ie exactly what do you want to do AND what have you done/tried so far?

rytec 01-25-2012 02:26 AM

OK,

I already have made a script which works on the ubuntu server itself, so this part is already OK.
But in this same script I like to send a command to my linux satellite decoder in the network that it has to stop softcam "/etc/init.d/stoftcam stop" then overwrite some files, and starts the softcam again "/etc/init.d/softcam start"
I can write files to this box from within the ubuntu server but I do not know how to send this command to the decoder.
do you need to start a terminal session too or can it be done by the same script? I think I have to create a sort of Telnet session to this decoder ip address?


All times are GMT -5. The time now is 05:20 AM.