Hi, when installing I am missing a script starting the gnocatan-meta-server for initiating new gnocatan-servers and connecting to them. I have written a small but working script to start, stop and restart the service. Maybe, you put it to your package 'games-board/gnocatan' for others to play that famous game at home without having deep knowledge about runlevels and services on Linux. Regards Sascha ---- my script sample ----------------------------- #!/sbin/runscript # This script will start gnocatan services. opts="${opts} start stop" depend() { need net } start() { ebegin "Starting gnocatan META server..." # start-stop-daemon --start --quiet --exec /usr/bin/gnocatan-meta-server if [ -n "$(ps ax | grep gnocatan-meta | grep -v grep)" ] ; then ebegin " already running." else /usr/bin/gnocatan-meta-server & fi eend $? } stop() { ebegin "Stopping gnocatan META server..." ebegin " stopping gnocatan servers..." if [ -n "$(ps ax | grep gnocatan-server | grep -v grep)" ] ; then killall gnocatan-server-console else ebegin " none were running." fi ebegin " stopping META server ..." if [ -n "$(ps ax | grep gnocatan-meta | grep -v grep)" ] ; then killall gnocatan-meta-server else ebegin " none were running." fi eend $? } restart() { svc_stop svc_start }
Created attachment 17682 [details] start stop restart script to put in /etc/init.d
Did start-stop-daemon not work? Why the commented out code with the slightly odd check for running? Just curious.
When starting the server with start-stop-daemon the script doesn't finish. That's why I do not use it. And when there is no process of gnocatan-meta-server is presented via ps the start-stop-daemon tells me it is aleady running and I can't stop it. I don't know start-stop-daemon program well enough.
I'm not sure what you are trying to do here. In almost all cases the is no need for users to start a gnocatan meta server. To play the game, you need to run the gnocatan client. To host a game, you need to start the gnocatan server. If you host a game, you can add AI players or you can wait for people (friends?) to enter. If you join a game on someone elses computer, you dont need a server. The meta server is a server that holds a list of all active servers. This way you can look on the internet and find people to play. You can join their game, or you can register your own server at the meta server. This way other players can find and enter your server. The meta-server is currently located at gnocatan.debian.net. Unless you have your own private internet or something, there's no need to start a meta server IMO. Also, I don't think starting a gnocatan server at startup will be very useful. The server needs setting like what map, how many players, etc. Most people use the gtk frontend (gnocatan-server-gtk) to set the game settings. Also, there just is a new version of Gnocatan (0.8.0.0). Many bug fixes. I submitted the ebuild at Bug #31162 and it should be in portage soon. If you have more questions, check the help, the website, or mail us at gnocatan-develop@lists.sourceforge.net
Yeah, I kind of don't see the point of the init script either. Sorry. If I'm missing something really obvious, go ahead and reopen with a more detailed reason for including the init script. Thanks.