[ycom] / portage / trunk / www-apps / vhcs / files / vhcs-init.d Project Root:

ViewCVS logotypeView of /portage/trunk/www-apps/vhcs/files/vhcs-init.d

Parent Directory Parent Directory | Revision Log Revision Log


Revision: 667 - (download) (annotate)
Fri Jun 2 09:38:16 2006 UTC (12 days, 3 hours ago) by jbu
File size: 993 byte(s)
Correction appel de fonction
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
need net
	use logger
	after sshd
}

setipacct() {
	${RMMOD} ipchains 1>/tmp/vhcs2_network.log 2>/tmp/vhcs2_network.err.log
	# all traffic

	/sbin/iptables -I INPUT

	/sbin/iptables -I OUTPUT

	# web traffic
	/sbin/iptables -I INPUT -p tcp --dport 80
	/sbin/iptables -I OUTPUT -p tcp --sport 80

	# pop3 traffic
	/sbin/iptables -I INPUT -p tcp --dport 110
	/sbin/iptables -I OUTPUT -p tcp --sport 110

	# imap traffic
	/sbin/iptables -I INPUT -p tcp --dport 143
	/sbin/iptables -I OUTPUT -p tcp --sport 143

	# mail traffic
	/sbin/iptables -I INPUT  -p tcp --dport 25
	/sbin/iptables -I OUTPUT -p tcp --sport 25

}

start() {
	ebegin "Starting VHCS2"
	start-stop-daemon --start --verbose --exec ${DAEMON}  -- -p ${PID}
	setipacct
	eend $?
}

stop() {
	ebegin "Stopping VHCS2"
	start-stop-daemon --stop --verbose --pidfile ${PID} --exec ${DAEMON}
	eend $?
}

Source Version Control Administrator

Powered by ViewCVS 1.0_pre20050929

ViewCVS and CVS Help