#!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 opts="${opts}" VUURMUUR="Vuurmuur" VUURMUUR_BIN=/usr/bin/vuurmuur VUURMUUR_CONF=/etc/vuurmuur/config.conf VUURMUUR_PID=/var/run/vuurmuur.pid VUURMUUR_OPTS="-l" VUURMUURLOG="Vuurmuur_log" VUURMUURLOG_BIN=/usr/bin/vuurmuur_log # space separated list of modules to load on start, or 'none' if none ;-) #MODULES_TO_LOAD="ip_tables iptable_filter iptable_mangle iptable_nat ip_conntrack ipt_state ip_conntrack_ftp ip_nat_ftp ip_queue" MODULES_TO_LOAD="none" # this next comment is important, don't remove it - it has to be somewhere in # the init script to kill off a warning that doesn't apply to us # svc_start svc_stop depend() { need net iptables use modules } load_modules() { if [ "$MODULES_TO_LOAD" != "none" ]; then ebegin "Loading modules for ${VUURMUUR}" # load the modules local module for module in `echo $MODULES_TO_LOAD`; do modprobe ${module} echo -n "${module} " done eend $? fi } start() { if load_modules ; then ebegin "Starting ${VUURMUUR}" if test ! -f ${VUURMUUR_CONF}; then eerror "Configuration file, ${VUURMUUR_CONF} does not exist." eend 2 return 2 fi #start-stop-daemon --start --quiet --exec ${VUURMUUR_BIN} -- ${VUURMUUR_OPTS} start-stop-daemon --start --exec ${VUURMUUR_BIN} -- ${VUURMUUR_OPTS} eend $? ebegin "Starting ${VUURMUURLOG}" #start-stop-daemon --start --quiet --exec ${VUURMUURLOG_BIN} start-stop-daemon --start --exec ${VUURMUURLOG_BIN} eend $? else eend 1 return 1 fi } stop() { ebegin "Stopping ${VUURMUUR}" #start-stop-daemon --stop --quiet --pidfile ${VUURMUUR_PID} start-stop-daemon --stop --pidfile ${VUURMUUR_PID} eend $? ebegin "Stopping ${VUURMUURLOG}" #start-stop-daemon --stop --quiet --exec ${VUURMUURLOG_BIN} start-stop-daemon --stop --exec ${VUURMUURLOG_BIN} eend $? }