Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ?).
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...
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
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.