#!/bin/sh # # IGMPproxy daemon control script. # # Make this script executable to start nginx at boot. BIN=/usr/sbin/igmpproxy CONF=/etc/igmpproxy.conf start() { # Sanity checks. if [ ! -r $CONF ]; then # no config file, exit: echo "$CONF not found. Abort." exit 1 fi echo "Starting igmpproxy..." if [ -x $BIN ]; then $BIN $CONF fi } stop() { echo "Shutdown igmpproxy..." kill $(pidof $BIN) } restart() { stop sleep 2 start } status() { cat /proc/net/ip_mr_vif echo cat /proc/net/ip_mr_cache } case "$1" in start) start ;; stop) stop ;; restart) restart ;; status) status ;; *) echo "usage: `basename $0` {start|status|stop|restart}" esac