Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37910513
en ru br
ALT Linux repos
5.0: 0.11.5-alt1
4.1: 0.11.5-alt1
4.0: 0.11.5-alt1
3.0: 0.11.5-alt1

Group :: Monitoring
RPM: ipfm

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#!/bin/sh
#
# ipfm This shell script takes care of starting and stopping ipfm.
#
# chkconfig: - 85 15
# description: IP Flow Meter
# processname: ipfm
# config: /etc/ipfm.conf
# pidfile: /var/run/ipfm.pid

NAME=ipfm

[ -f /etc/$NAME.conf ] || exit 0

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

PIDFILE=/var/run/$NAME.pid
LOCKFILE=/var/lock/subsys/$NAME
RETVAL=0

do_call() {
$1 --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- $NAME
RETVAL=$?
return $RETVAL
}

restart() {
do_call stop_daemon
do_call start_daemon
}

function ipfm_main()
{
case "$1" in
start) do_call start_daemon ;;
stop) do_call stop_daemon ;;
reload) restart ;;
restart) restart ;;
status) do_call status ;;
condstop) [ -e "$LOCKFILE" ] && do_call stop_daemon ;;
condrestart) [ -e "$LOCKFILE" ] && restart ;;
condreload) [ -e "$LOCKFILE" ] && restart ;;
*) msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1
esac

return $RETVAL
}

ipfm_main "$@"

## EOF ##
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin