summaryrefslogtreecommitdiff
path: root/network/igmpproxy/rc.igmpproxy
blob: 1b44b871f8ba770bb99fe30396bd09841f6d6303 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
# Start/stop/restart igmpproxy (IGMP multicast routing daemon).

# Start igmpproxy:
igmpproxy_start() {
  if [ -x /usr/sbin/igmpproxy ]; then
    echo "Starting igmpproxy:  /usr/sbin/igmpproxy"
    /usr/sbin/igmpproxy /etc/igmpproxy.conf
  fi
}

# Stop igmpproxy:
igmpproxy_stop() {
  killall igmpproxy
}

# Restart igmpproxy:
igmpproxy_restart() {
  igmpproxy_stop
  sleep 1
  igmpproxy_start
}

case "$1" in
'start')
  igmpproxy_start
  ;;
'stop')
  igmpproxy_stop
  ;;
'restart')
  igmpproxy_restart
  ;;
*)
  echo "usage rc.igmpproxy: start|stop|restart"
esac