#!/bin/bash # # conntrackd Start conntrackd using /etc/conntrackd.conf # # Written by Max Kellermann # ### BEGIN INIT INFO # Provides: conntrackd # Required-Start: $network $syslog $remote_fs # Required-Stop: $network $syslog $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: Starts conntrackd # short-description: Starts conntrackd ### END INIT INFO #includes lsb functions source /lib/lsb/init-functions PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/conntrackd test -x $DAEMON || exit 0 CONFIG=/etc/conntrackd/conntrackd.conf OPTIONS="" test -f /etc/default/conntrackd && source /etc/default/conntrackd test -f $CONFIG || exit 0 case "$1" in start) log_begin_msg "Starting conntrackd" start-stop-daemon --start --quiet \ --exec $DAEMON \ -- \ -d \ -C "$CONFIG" \ $OPTIONS log_end_msg $? ;; stop) log_begin_msg "Stopping conntrackd" $DAEMON \ -C "$CONFIG" \ -k log_end_msg $? ;; restart|force-reload) $0 stop sleep 1 $0 start ;; *) log_action_msg "Usage: /etc/init.d/conntrackd {start|stop|restart|force-reload}" exit 1 ;; esac exit 0