logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Launching nwn server from a remote terminal

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support
View previous topic :: View next topic  
Author Message
Anya



Joined: 22 May 2007
Posts: 6

PostPosted: Thu Dec 31, 2009 8:30    Post subject: Launching nwn server from a remote terminal Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Thu Dec 31, 2009 9:04    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Anya



Joined: 22 May 2007
Posts: 6

PostPosted: Fri Jan 01, 2010 2:19    Post subject: Reply with quote

That worked, thank you.
Back to top
View user's profile Send private message
Paul R



Joined: 17 Apr 2009
Posts: 42

PostPosted: Fri Jan 01, 2010 15:00    Post subject: Reply with quote

(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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Jan 01, 2010 18:13    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group