#!/sbin/runscript # $Header: /var/cvsroot/gentoo-x86/net-analyzer/midas-nms/files/midas-nms.init,v 1.1 2004/10/20 15:17:45 bass Exp $ depend() { if [ "$MIDASs" ] ; then snort fi } start() { if [ "$MIDASc" ] ; then ebegin "Starting Midas-c" start-stop-daemon --start --quiet --exec /usr/bin/MIDASc pidof MIDASc > /var/run/MIDASc eend ${?} fi if [ "$MIDASa" ] ; then ebegin "Starting Midas-a" start-stop-daemon --start --quiet --exec /usr/bin/MIDASa pidof MIDASa > /var/run/MIDASa eend ${?} fi if [ "$MIDASn" ] ; then ebegin "Starting Midas-n" start-stop-daemon --start --quiet --exec /usr/bin/MIDASn pidof MIDASn > /var/run/MIDASn eend ${?} fi if [ "$MIDASs" ] ; then ebegin "Starting Midas-s" start-stop-daemon --start --quiet --exec /usr/bin/MIDASs pidof MIDASs > /var/run/MIDASs eend ${?} fi if [ "$MIDASd" ] ; then ebegin "Starting Midas-d" start-stop-daemon --start --quiet --exec /usr/bin/MIDASd einfo "Wait 5 seconds...." sleep 5 pidof MIDASd > /var/run/MIDASd eend ${?} fi } stop() { if [ "$MIDASs" ] ; then ebegin "Stopping Midas-s" start-stop-daemon --stop --quiet --pidfile /var/run/MIDASs eend ${?} fi if [ "$MIDASn" ] ; then ebegin "Stopping Midas-n" start-stop-daemon --stop --quiet --pidfile /var/run/MIDASn eend ${?} fi if [ "$MIDASa" ] ; then ebegin "Stopping Midas-a" start-stop-daemon --stop --quiet --pidfile /var/run/MIDASa eend ${?} fi if [ "$MIDASc" ] ; then ebegin "Stopping Midas-c" start-stop-daemon --stop --quiet --pidfile /var/run/MIDASc eend ${?} fi if [ "$MIDASd" ] ; then ebegin "Stopping Midas-d" start-stop-daemon --stop --quiet --pidfile /var/run/MIDASd eend ${?} fi }