summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina <zerochaos@gentoo.org>2019-06-12 23:03:29 -0400
committerRick Farina <zerochaos@gentoo.org>2019-06-12 23:03:43 -0400
commit9e4c3dfe23b6221c79571dde05b0f4c5e9e981e7 (patch)
tree5ecf00b79747594357f40a77de85e94b0dafcfb0
parentapp-editors/neovim: version bump to 0.3.7 (diff)
downloadgentoo-9e4c3dfe23b6221c79571dde05b0f4c5e9e981e7.tar.gz
gentoo-9e4c3dfe23b6221c79571dde05b0f4c5e9e981e7.tar.bz2
gentoo-9e4c3dfe23b6221c79571dde05b0f4c5e9e981e7.zip
net-wireless/kismet: fix service
Package-Manager: Portage-2.3.67, Repoman-2.3.14 Signed-off-by: Rick Farina <zerochaos@gentoo.org>
-rw-r--r--net-wireless/kismet/files/kismet.confd-r114
-rw-r--r--net-wireless/kismet/files/kismet.initd-r126
-rw-r--r--net-wireless/kismet/kismet-9999.ebuild4
3 files changed, 42 insertions, 2 deletions
diff --git a/net-wireless/kismet/files/kismet.confd-r1 b/net-wireless/kismet/files/kismet.confd-r1
new file mode 100644
index 000000000000..42f617372ff5
--- /dev/null
+++ b/net-wireless/kismet/files/kismet.confd-r1
@@ -0,0 +1,14 @@
+# /etc/conf.d/kismet - configuration file for /etc/init.d/kismet
+
+# Kismet configuration is done in /etc/kismet*.conf
+# It is recommended to put user config in /etc/kismet_site.conf
+# where kismet updates won't try to overwrite it.
+
+# To use the kismet init script, you must have "logtemplate" set to a location
+# that is writable by the user assigned by "suiduser".
+# e.g.
+# suiduser=foo
+# logtemplate=%h/kismet_log/%n-%d-%i.%l
+
+# Options to pass to kismet, see `kismet --help`
+KISMET_SERVER_OPTIONS="--no-ncurses"
diff --git a/net-wireless/kismet/files/kismet.initd-r1 b/net-wireless/kismet/files/kismet.initd-r1
new file mode 100644
index 000000000000..4c1891611967
--- /dev/null
+++ b/net-wireless/kismet/files/kismet.initd-r1
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+checkconfig() {
+ if [ ! -e /etc/kismet.conf ]; then
+ eerror "Configuration file /etc/kismet.conf not found"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting kismet server"
+ start-stop-daemon --start --quiet --pidfile /run/kismet.pid \
+ --background --make-pidfile --exec /usr/bin/kismet \
+ -- ${KISMET_SERVER_OPTIONS}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping kismet server"
+ start-stop-daemon --stop --quiet --pidfile /run/kismet.pid
+ eend ${?}
+}
diff --git a/net-wireless/kismet/kismet-9999.ebuild b/net-wireless/kismet/kismet-9999.ebuild
index 2ddf82ae347d..ec7ea7c64b4e 100644
--- a/net-wireless/kismet/kismet-9999.ebuild
+++ b/net-wireless/kismet/kismet-9999.ebuild
@@ -102,8 +102,8 @@ src_install() {
#dodoc CHANGELOG RELEASENOTES.txt README* docs/DEVEL.client docs/README.newcore
dodoc CHANGELOG README*
- newinitd "${FILESDIR}"/${PN}.initd kismet
- newconfd "${FILESDIR}"/${PN}.confd kismet
+ newinitd "${FILESDIR}"/${PN}.initd-r1 kismet
+ newconfd "${FILESDIR}"/${PN}.confd-r1 kismet
}
pkg_preinst() {