Ok here is a script I put together after reading and trying many others.Comments please.
I use the awesome
nwservctl.sh script to stop and start it ...trouble is if it crashes the in.fifo , out.fifo files are left in the directory and the nwservctl.sh will not start with them already in.
<-------------begin script ----------------->
#!/bin/bash
cd /home/dan
if [ "$(pidof nwserver)" ] ;
then
echo "nwserver already running..."
else
rm -f in.fifo
rm -f out.fifo
sleep 2s
./nwservctl.sh start
fi
<----------------------- end script ---------------->
Modifié par Knight_Shield, 11 juin 2011 - 12:28 .