From 1b7ff6dacea160aece9f1f9d7226858589919ffd Mon Sep 17 00:00:00 2001 From: velnias75 Date: Fri, 9 Jan 2015 14:09:33 +0100 Subject: [PATCH] installing xinetd service file --- Makefile.am | 12 +++++++++++- README.md | 2 +- debian/control | 1 + debian/netmaumau-server-common.dirs | 1 + debian/netmaumau-server-common.install | 1 + netmaumau.xinetd.in | 14 ++++++++++++++ 6 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 debian/netmaumau-server-common.dirs create mode 100644 netmaumau.xinetd.in diff --git a/Makefile.am b/Makefile.am index 3535259..730fe08 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,11 +1,21 @@ SUBDIRS = src doc +xinetddir = $(sysconfdir)/xinetd.d +xinetd_DATA = netmaumau + ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = COPYING netmaumau.ico +EXTRA_DIST = COPYING netmaumau.ico netmaumau.xinetd.in + +CLEANFILES = netmaumau + +DISTCLEANFILES = NetMauMau-dbg.db AM_DISTCHECK_CONFIGURE_FLAGS = --disable-client --enable-cli-client --enable-pidfile +netmaumau: $(top_srcdir)/netmaumau.xinetd.in + $(AM_V_GEN)$(SED) -e 's|@bindir[@]|$(bindir)|g' < $< > $@ + if CHECKCPP # suppression template: // cppcheck-suppress {id} cppcheck: diff --git a/README.md b/README.md index d5f660e..757f340 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ A *sample **xinetd** service configuration* can look as following: protocol = tcp user = root server = /usr/bin/nmm-server - server_args = --inetd --port=8899 + server_args = --inetd type = UNLISTED wait = yes instances = 1 diff --git a/debian/control b/debian/control index bf3cc47..c3f0531 100644 --- a/debian/control +++ b/debian/control @@ -12,6 +12,7 @@ Homepage: https://github.com/velnias75/NetMauMau/ Package: netmaumau-server-common Architecture: all +Recommends: xinetd Depends: ${misc:Depends} Description: Server for the popular card game Mau Mau - common server files Provides a server for the popular card game NetMauMau. Up to 5 players can diff --git a/debian/netmaumau-server-common.dirs b/debian/netmaumau-server-common.dirs new file mode 100644 index 0000000..b20cee9 --- /dev/null +++ b/debian/netmaumau-server-common.dirs @@ -0,0 +1 @@ +/etc/xinetd.d diff --git a/debian/netmaumau-server-common.install b/debian/netmaumau-server-common.install index dec11f0..f98afa1 100644 --- a/debian/netmaumau-server-common.install +++ b/debian/netmaumau-server-common.install @@ -1 +1,2 @@ +/etc/xinetd.d/netmaumau /usr/share/netmaumau/*.PNG diff --git a/netmaumau.xinetd.in b/netmaumau.xinetd.in new file mode 100644 index 0000000..beb6dc3 --- /dev/null +++ b/netmaumau.xinetd.in @@ -0,0 +1,14 @@ +service netmaumau +{ + disable = no + per_source = 1 + port = 8899 + socket_type = stream + protocol = tcp + user = root + server = @bindir@/nmm-server + server_args = --inetd + type = UNLISTED + wait = yes + instances = 1 +}