]>
Commit | Line | Data |
---|---|---|
7e7495b3 MT |
1 | #!/bin/sh |
2 | ######################################################################## | |
3 | # Begin $rc_base/init.d/ | |
4 | # | |
5 | # Description : UPnP Starter | |
6 | # | |
7 | # Authors : Michael Tremer | |
8 | # | |
9 | # Version : 01.00 | |
10 | # | |
11 | # Notes : for www.ipfire.org - GPLv2 | |
12 | # | |
13 | ######################################################################## | |
14 | ||
15 | . /etc/sysconfig/rc | |
16 | . ${rc_functions} | |
17 | ||
18 | # defaults | |
19 | ALLOW_MULTICAST=no | |
20 | ||
21 | # configuration | |
97de2cae | 22 | eval $(/usr/local/bin/readhash /var/ipfire/upnp/settings) |
7e7495b3 MT |
23 | |
24 | case "$1" in | |
25 | start) | |
26 | boot_mesg "Starting Universal Plug'n'Play daemon..." | |
27 | loadproc /usr/sbin/upnpd $EXTIFACE $INTIFACE | |
28 | evaluate_retval | |
29 | [ "$ALLOW_MULTICAST" != "no" ] && route add -net 239.0.0.0 netmask 255.0.0.0 $INTIFACE | |
30 | ;; | |
31 | ||
32 | stop) | |
33 | boot_mesg "Stopping Universal Plug'n'Play daemon..." | |
34 | killproc /usr/sbin/upnpd | |
35 | evaluate_retval | |
36 | [ "$ALLOW_MULTICAST" != "no" ] && route del -net 239.0.0.0 netmask 255.0.0.0 $INTIFACE | |
37 | ;; | |
38 | ||
39 | restart) | |
40 | ${0} stop | |
41 | sleep 1 | |
42 | ${0} start | |
43 | ||
44 | ;; | |
45 | status) | |
46 | statusproc | |
47 | ;; | |
48 | ||
49 | *) | |
50 | echo "Usage: ${0} {start|stop|reload|restart|status}" | |
51 | exit 1 | |
52 | ;; | |
53 | esac | |
54 | ||
55 | # End $rc_base/init.d/ |