diff options
author | Leonardo Arena <rnalrd@gmail.com> | 2010-10-26 09:40:33 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@gmail.com> | 2010-10-26 09:40:33 +0000 |
commit | 6d260f6fcc07a1b0ae6b34a0c07d1668fcf08556 (patch) | |
tree | 9af4cf760b25189dd9aac1119b9b02adbc98b09d /main/ntop/ntop.initd | |
parent | eb4656448c5960be15d07fd4e6da8fc0899a6367 (diff) | |
download | aports-6d260f6fcc07a1b0ae6b34a0c07d1668fcf08556.tar.bz2 aports-6d260f6fcc07a1b0ae6b34a0c07d1668fcf08556.tar.xz |
testing/ntop: moved to main
Diffstat (limited to 'main/ntop/ntop.initd')
-rw-r--r-- | main/ntop/ntop.initd | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/main/ntop/ntop.initd b/main/ntop/ntop.initd new file mode 100644 index 0000000000..ffc2923790 --- /dev/null +++ b/main/ntop/ntop.initd @@ -0,0 +1,30 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +checkconfig() { + 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 +} + +start() { + checkconfig || return 1 + ebegin "Starting ntop" + 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) + start-stop-daemon --start --exec /usr/bin/ntop -- -d -L ${NTOP_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ntop" + start-stop-daemon --stop --retry 30 --pidfile /var/run/ntop.pid + eend $? +} |