After some thorough testing of the nwservctl.sh script and reading the man page of empty, I found out that you must not create the fifos beforehand.
From 'man empty':
An interface for the input and output data channels of the forked process is performed by two fifo files which names may be specified with -i and -o keys. These files are automatically created/deleted any time you start/exit empty daemon, so you must not create them manually.
empty -f
will not work with precreated fifo files so nwserver never starts. I could not test with nwnx2 because I don't have it, but with plain nwserver, everything works and you can communicate with nwserver via the nwservctl.sh script. Bear in mind, though, that lots of server commands are set up in a way so that they don't give output on the console. I don't know wether nwserver would create output on those commands, but the script only catches output for status, help and listbans. All other commands stay silent, even if they normally would give output.
About correct passphrases for nwnx2, the variable in the script holds the value nwstartup.sh returns, and as soon as
empty -w
finds in in the out.fifo, it reports back successful server startup.
HTH
Greetings
Skildron
Modifié par Skildron, 10 novembre 2010 - 10:57 .