mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
27 lines
578 B
Plaintext
27 lines
578 B
Plaintext
#!/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 $?
|
|
}
|
|
|