Smaug as a background process

Posted by Dark_Trunks on Tue 17 Sep 2002 10:38 PM — 3 posts, 13,875 views.

Australia #0
Hi, I was wondering if there is any way to have SMAUG run as a background service under RedHat 7.3. At the moment, whether I run the smaug executable or the startup script, the process ends as soon as I log out of the system. This is quite annoying because I can only telnet into my server and I would like to close the window and still have smaug running.

Thanks in advance for any advice that anyone can provide.
Australia Forum Administrator #1
I presume you are running it as a background process with "&"? I suggest using sudo to run it as another use, so it isn't related to the current process. I have the following lines in my rc.local file:



#
# SMAUG
#

echo 'Starting SMAUG ...'
sudo -u nick sh -c 'cd /home/nick/smaug/src && /home/nick/smaug/src/startup 4000 &'


What this does is "cd" to the smaug src directory and then run the startup shell script.

Since that is in the rc.local file I don't even need to log in at all, it runs when the PC is booted.

This is under OpenBSD, I am not sure what file RedHat uses, but there would be a similar or identically named one. (Try: /etc/rc.d/rc.local).
Australia #2
Great! Worked like a charm. Thanks Nick