View previous topic :: View next topic |
Author |
Message |
Anya
Joined: 22 May 2007 Posts: 6
|
Posted: Thu Dec 31, 2009 8:30 Post subject: Launching nwn server from a remote terminal |
|
|
I am using a remote terminal (Putty) to launch the nwnstartup.sh script and start the module on a linux server after a module/hak update.
Everything starts fine. The problem I found is when I close the remote terminal the module is shut down also.
This is the nwnstartup.sh script.
Code: |
#!/bin/sh
export LD_PRELOAD=./nwnx2.so
export LD_PRELOAD=./nwnx_odbc.so
./nwserver \
-publicserver 1 \
-servername "MyServer" \
-port 5121 \
-dmpassword asuperpw \
-oneparty 0 \
-pvp 2 \
-difficulty 4 \
-elc 1 \
-ilr 0 \
-reloadwhenempty 0 \
-module "MyServer" \
-maxclients 32 \
-servervault 1 \
-maxlevel 40 \
-gametype 3 \
-autosaveinterval 0 \
"$@"
|
Any help is appreciated. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Thu Dec 31, 2009 9:04 Post subject: |
|
|
Use screen.
as root:
apt-get install screen
as nwn user:
screen -D -RR
then launch nwn server
to reattach the screen again when you log in, type:
screen -x _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
Anya
Joined: 22 May 2007 Posts: 6
|
Posted: Fri Jan 01, 2010 2:19 Post subject: |
|
|
That worked, thank you. |
|
Back to top |
|
|
Paul R
Joined: 17 Apr 2009 Posts: 42
|
Posted: Fri Jan 01, 2010 15:00 Post subject: |
|
|
(Nothing to do with screen and detaching but just in case you have problems with using more than one plugin)
Also note that the setting of the environment variable is not accumulative, in other words the second export statement will replace the first unless you include the current environment variable value:
Code: | export LD_PRELOAD=./nwnx2.so
export LD_PRELOAD=${LD_PRELOAD}:./nwnx_odbc.so |
or probably easy to write as:
Code: | export LD_PRELOAD=./nwnx2.so:./nwnx_odbc.so |
With nwnx2 though you typically only add the nwnx2.so shared object and it loads the plugins in the same directory for you. The only exceptions to this I can think of are the *override.so replacements for the related net/file/open function calls. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Jan 01, 2010 18:13 Post subject: |
|
|
Paul R is right. Don't specify plugins in LD_PRELOAD line. NWNX Core (nwnx2.so) loads them automatically. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
|