summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/ntopng/files/ntopng.init.d')
-rw-r--r--net-analyzer/ntopng/files/ntopng.init.d20
1 files changed, 20 insertions, 0 deletions
diff --git a/net-analyzer/ntopng/files/ntopng.init.d b/net-analyzer/ntopng/files/ntopng.init.d
new file mode 100644
index 000000000000..2764118fc468
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng.init.d
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net redis
+}
+
+start() {
+ ebegin "Starting ntopng"
+ start-stop-daemon --start --exec /usr/bin/ntopng --pidfile /var/run/ntopng.pid --make-pidfile --background -e LUA_PATH='/usr/share/ntopng/scripts/lua/modules/?.lua' -- --user ntopng ${NTOPNG_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ntopng"
+ start-stop-daemon --stop --exec /usr/bin/ntopng --pidfile /var/run/ntopng.pid
+ eend $?
+}