Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > e090330a658a42842b90eb940cbeca51 > files > 2

iplog-2.2.3-19.mga1.i586.rpm

#!/bin/sh
#
#	This shell script takes care of starting and stopping
#	iplog.
#
# chkconfig: 345 90 08
# description:  This program lets you log tcp, udp, and icmp \
#               connections in syslog, along with the hostname.
#

# Comments to support LSB init script conventions
### BEGIN INIT INFO
# Provides: iplog
# Required-Start: $syslog $network
# Required-Stop: $syslog $network
# Default-Start:  3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop iplog
# Description: This program lets you log tcp, udp, and icmp \
#               connections in syslog, along with the hostname.
### END INIT INFO

#
# Configuration is in /etc/iplog.conf
#

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

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        gprintf "Starting %s: " "iplog"
	daemon iplog
	touch /var/lock/subsys/iplog
        echo
        ;;
  stop)
        # Stop daemons.
        gprintf "Shutting down %s: " "iplog"
	killproc iplog
	rm -f /var/lock/subsys/iplog
        echo
        ;;
  restart|reload)
	$0 stop
	$0 start
	;;
  status)
	status iplog
	;;

  *)
	gprintf "Usage: %s %s\n" "iplog" "{start|stop|restart|status}"
	exit 1
esac

exit $RETVAL