summaryrefslogtreecommitdiff
path: root/net-analyzer/ntop/files/ntop-initd-r1
blob: e303753891e678cad0c3b9b5cfe651fd4e7ce677 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/sbin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

description="ntop - a network traffic analyzer"
pidfile="/run/ntop.pid"
command="/usr/bin/ntop"
command_args="-L ${NTOP_OPTS}"
start_stop_daemon_args="-p ${pidfile} -m -b"

depend() {
	need net
}

start_pre() {
	if [ ! -e /var/lib/ntop/ntop_pw.db ] ; then
		eerror "You need to set a password first by running"
		eerror "ntop --set-admin-password"
		return 1
	fi

	export LC_ALL=C # apparently doesn't work with some locales (#191576 and #205382)
	export GDFONTPATH=/usr/share/fonts/corefonts # apparently the only font that works (#231705)
}