#!/bin/sh

# Copyright (C) 2000 NEC Corporation
# All Rights Reserved.

# RCS: $Id: wbmcinit,v 1.2 2012/09/07 11:51:29 wbmc Exp $


#
# Startup script for the Management Console
#
# chkconfig: 345 08 99
# description: Management Console Startup Script.

case "$1" in
  start)
	/opt/nec/wbmc/bin/wbmcdaily
	/opt/nec/wbmc/bin/kdi
	## add 2003/03/31 iptables -t filter begin ##
	/sbin/iptables-restore -c -n < /etc/opt/nec/wbmc/iptables.conf > /dev/null 2>&1
	## add 2003/03/31 iptables -t filter end ##
	if [ -f /proc/sys/net/ipv4/ip_conntrack_max ];
		then
		ICM=`cat /proc/sys/net/ipv4/ip_conntrack_max`
		if [ "$ICM" -lt 650520 ];
			then
				echo 650520 > /proc/sys/net/ipv4/ip_conntrack_max
		fi
	fi
	;;
  stop)
	;;
  status)
	;;
  restart)
	$0 stop
	$0 start
	;;
  *)
	echo "Usage: $0 {start|stop|restart|status}"
	exit 1
esac

exit 0

