aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/ntopng/ntopng.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-01-02 10:06:06 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-01-02 10:06:06 +0000
commit7c6239b112238719c308c1640f9cf50fcf44a148 (patch)
tree211cd3a4cb82eaaaae51d3ba900f6cbff0952c2a /unmaintained/ntopng/ntopng.initd
parent8567007f74e878fb8abc7c43b0f887f4fda372b7 (diff)
downloadaports-7c6239b112238719c308c1640f9cf50fcf44a148.tar.bz2
aports-7c6239b112238719c308c1640f9cf50fcf44a148.tar.xz
testing/ntopng: move to unmaintained
Diffstat (limited to 'unmaintained/ntopng/ntopng.initd')
-rw-r--r--unmaintained/ntopng/ntopng.initd26
1 files changed, 26 insertions, 0 deletions
diff --git a/unmaintained/ntopng/ntopng.initd b/unmaintained/ntopng/ntopng.initd
new file mode 100644
index 0000000000..c625b2ca46
--- /dev/null
+++ b/unmaintained/ntopng/ntopng.initd
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+
+depend() {
+ need net
+ use redis
+}
+
+command="/usr/bin/ntopng"
+pidfile="/var/run/ntopng/ntopng.pid"
+: ${exec_user:=ntop}
+: ${command_args:="--daemon --data-dir /var/lib/ntopng --httpdocs-dir /usr/share/ntopng/httpdocs --pid $pidfile -U $exec_user $NTOPNG_OPTS"}
+
+checkconfig() {
+ if [ ! -e /usr/share/ntopng/httpdocs/geoip/GeoIPASNum.dat ] || \
+ [ ! -e /usr/share/ntopng/httpdocs/geoip/GeoLiteCity.dat ]; then
+ eerror "You need download the GeoIP database"
+ eerror "ntopng-update-geoip-db"
+ return 1
+ fi
+}
+
+prestart() {
+ checkconfig || return 1
+ eend $?
+}
+