LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-20-2001, 02:18 AM   #1
DJFauß
Member
 
Registered: May 2001
Location: Germany
Distribution: SuSE 8.1
Posts: 48

Rep: Reputation: 15
Angry


I have a Network with a Linux router / server which is supposed to be running UT as a server.

I don't wanna have UT running the whole time for pings sake when I play on a server on the other side of the network (map changing on my own server will kill me ...)

I access my server via SSH2. When I start UT from the SSH console I have the problem that I can't close the console without killing the UT process on the way (as a result I can't crash my own computer or turn it off).

QUESTION: Is there a way to execute a shell command from within the SSH console that runs UT as a service or virtually on another console (like tty2 ?).
 
Old 05-20-2001, 04:51 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
u can run it in the background if it doesnt need commandline control. make this script executable (chmod 0500).
#cut after this line
#!/bin/sh
case "$1" in
start)
echo -n "Starting UT Server"
#A &
;;
kill)
echo -n "Stopping UT Server"
kill -s TERM $(pidof #B)
;;
*)
echo "Usage: #C {start|kill}"
exit 1
esac
exit 0
#cut before this line

substitute for #A /path/to/name_of_executable
substitute for #B name_of_executable
substitute for #C scriptname
now u can run it as "scriptname start"
*Always be carefull with scripts u didnt write ureself...
 
Old 05-20-2001, 04:58 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Indentation clearly sux0rz here :-] Indentation aint necessary, but when u get to edit larger scripts ure glad uve trained ureself to code clearly. Replace the underscores with spaces or pipe tru sed like this: cat script.badder | sed -e "s/_/ /g" > script.better

#cut after this line
#!/bin/sh
case "$1" in
_____start)
___________echo -n "Starting UT Server"
___________#A &
___________;;
______kill)
___________echo -n "Stopping UT Server"
___________kill -s TERM $(pidof #B)
___________;;
_________*)
___________echo "Usage: #C {start|kill}"
___________exit 1
esac
exit 0
#cut before this line
 
Old 05-21-2001, 12:36 PM   #4
DJFauß
Member
 
Registered: May 2001
Location: Germany
Distribution: SuSE 8.1
Posts: 48

Original Poster
Rep: Reputation: 15
Thx for the script (I really need this bad) ... but would this actually run the program on another console? If I close the SSH2 console UT will be deleted out of memory, won't it?
 
Old 05-21-2001, 04:39 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
just make the line where we start the server like this:

nohup server_executable &

if u logout itll still run, have a nice value & when u log on u can catch any errors from file nohup.out
 
Old 05-22-2001, 11:33 AM   #6
DJFauß
Member
 
Registered: May 2001
Location: Germany
Distribution: SuSE 8.1
Posts: 48

Original Poster
Rep: Reputation: 15
Thx .. this solved my problem ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
running programs jdarvwill Linux - Software 3 10-05-2005 10:15 PM
Limiting what programs you can start via ssh garion Linux - Security 2 09-17-2005 05:28 AM
Graphical Programs over ssh andrewguy9 Linux - Software 2 02-24-2005 08:30 AM
Running programs via ssh Nazxul Linux - Software 2 04-24-2004 03:06 PM
Help on Running Programs mooreted Linux - Software 3 05-16-2003 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration