summaryrefslogtreecommitdiff
path: root/net-analyzer/portmon/files/portmon.init
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/portmon/files/portmon.init
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/portmon/files/portmon.init')
-rw-r--r--net-analyzer/portmon/files/portmon.init29
1 files changed, 29 insertions, 0 deletions
diff --git a/net-analyzer/portmon/files/portmon.init b/net-analyzer/portmon/files/portmon.init
new file mode 100644
index 000000000000..3fe1ea6a2819
--- /dev/null
+++ b/net-analyzer/portmon/files/portmon.init
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# configuration is done in /etc/pormon.sh
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/portmon/portmon.hosts ]; then
+ error " You need /etc/portmon/portmaon.hosts to run portmon."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting portmon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/portmon -- -d -c /etc/portmon/portmon.hosts
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+ ebegin "Staring portmon"
+ start-stop-daemon --stopt --quiet --exec /usr/sbin/portmon
+}