diff options
author | Peter Volkov <pva@gentoo.org> | 2006-01-09 10:56:50 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2006-01-09 10:56:50 +0000 |
commit | c0de01a8149e72d0d2f1b40a564e2fa8dc14d74e (patch) | |
tree | fcd8eb4000e33f18e748e4910b9c90077386a595 /net-analyzer/ndsad/files/ndsad.init | |
parent | http://kernel.org/pub -> mirror://kernel/ in SRC_URI (diff) | |
download | gentoo-2-c0de01a8149e72d0d2f1b40a564e2fa8dc14d74e.tar.gz gentoo-2-c0de01a8149e72d0d2f1b40a564e2fa8dc14d74e.tar.bz2 gentoo-2-c0de01a8149e72d0d2f1b40a564e2fa8dc14d74e.zip |
Initial bump.
(Portage version: 2.0.53)
Diffstat (limited to 'net-analyzer/ndsad/files/ndsad.init')
-rw-r--r-- | net-analyzer/ndsad/files/ndsad.init | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/net-analyzer/ndsad/files/ndsad.init b/net-analyzer/ndsad/files/ndsad.init new file mode 100644 index 000000000000..2fa9d977d8f4 --- /dev/null +++ b/net-analyzer/ndsad/files/ndsad.init @@ -0,0 +1,30 @@ +#!/sbin/runscript + +depend() { + need net +} + +checkconfig() { + if [ ! -f /etc/ndsad.conf ] ; then + eerror "/etc/ndsad.conf does not file exists!" + return 1 + fi + + return 0 +} + +start() { + # Comment out the following line to get faster startups + checkconfig || return 1 + + ebegin "Starting ndsad" + # On success ndsad returns 1. + start-stop-daemon --start --quiet --exec /usr/sbin/ndsad -- -d ${NDSAD_OPTS} >/dev/null 2>&1 + eend $(( $? - 1 )) +} + +stop () { + ebegin "Stopping ndsad" + start-stop-daemon --stop --quiet --pidfile=/var/run/ndsad.pid --retry 20 >/dev/null + eend $? +} |