Soldato
Hi
I've got my .bashrc to automatically start a screen session or join the last screen session, so I can have processes running and no have to keep the connection live.
I'm been trying to setup a script to detach the screen session and close down the ssh connection automatially.
To detach, I can use 'screen -d <screen name>, but I can't get it to close down the connection correclty.
The way I've got it at the moment, is that I've placed and y/n prompt in the main bashrc script after the screen command, so when I detatch it prompts me of I want to keep the connection live. and if I press anything but 'y' it runs the exit command.
Is there any suggestions to make this better? I would prefer to be able to alias 'exit' command to a script that will detatch the screen and then exit the ssh connection.
Thanks in advance.
I've got my .bashrc to automatically start a screen session or join the last screen session, so I can have processes running and no have to keep the connection live.
I'm been trying to setup a script to detach the screen session and close down the ssh connection automatially.
To detach, I can use 'screen -d <screen name>, but I can't get it to close down the connection correclty.
The way I've got it at the moment, is that I've placed and y/n prompt in the main bashrc script after the screen command, so when I detatch it prompts me of I want to keep the connection live. and if I press anything but 'y' it runs the exit command.
Is there any suggestions to make this better? I would prefer to be able to alias 'exit' command to a script that will detatch the screen and then exit the ssh connection.
Thanks in advance.