View Full Version : Debian continiu running server (When putty shutdown)
ColdDoT
14th March 2006, 19:14
Hello i've got a problem
when i start a server prog of my server whith this command
$./ServerProg.sh
then it wil start a server that wil output a lot of text back to the console
but i want tu shutdown putty and i want that the server will continu to run but when i shutdown my putty the server stops
is there any way to change this(whith setting or other progs)
greets kevin
falko
14th March 2006, 19:36
Try this:
./ServerProg.sh &> /dev/null &
ColdDoT
14th March 2006, 20:13
Thx thats it :D thx a lot
but how can i stop that prog then ?
@off-topic
i like to give some color to my init.d startup files like suse
when i start a init.d script in suse you get
Starting mysql done
in debian you get
Starting mysql
is there some code for or a app
falko
15th March 2006, 01:40
Thx thats it :D thx a lot
but how can i stop that prog then ?
Run ps aux and search for the process ID. Then run
kill -9 <process_id> to kill it.
ColdDoT
15th March 2006, 08:17
Ye men you rules
till
15th March 2006, 09:21
Hi Kevin,
here is another useful small program, not for running daemons but for other admin tasks that shall be continued after you closed putty.
If you want to run a script or program, shutdown putty and continue the session later witout stopping the script, you shall have a look at the "screen" program.
Installation on Debian / ubuntu:
apt-get install screen
To start screen, run the command:
screen
Now you are in a type of virtual console, start your script now. For example the "top" command:
top
To close the session, press [ctrl] + a + d
Now you are again on your "normal" putty console. It seems as top is not running.
To connect back to your virtual screen console, run this command:
screen -r
Now you see that top is still running on your server.
Press "q" to stop the top program and then press [ctrl] + a + d to close the screen. If there is no program running in the screen virtual console, it closes completely and cannot be reopened with screen -r again.
For more screen commands, see:
man screen
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.