Renamed files and comments to fit new project name
[mtetherd] / tethering.sh
index bf40abc..9e3d045 100644 (file)
@@ -47,7 +47,7 @@ if [ "$EVENT" = "DeviceAdded" ]; then
        ifconfig "$IFACE" "$IF_ADDRESS"
        /sbin/modprobe ipt_MASQUERADE
        /usr/sbin/iptables -t nat -A POSTROUTING -o $INETDEV -j MASQUERADE
-       start-stop-daemon -S -p "$RUNFILE" -m -b -x /usr/sbin/dnsmasq -- -k -I lo -i "$IFACE" -a $IF_ADDRESS -z -F $IF_RANGE,3600
+       /usr/sbin/start-stop-daemon -S -p "$RUNFILE" -b -x /usr/sbin/dnsmasq -- -x "$RUNFILE" -k -I lo -i "$IFACE" -a $IF_ADDRESS -z -F $IF_RANGE,3600
        echo 1 > /proc/sys/net/ipv4/conf/$IFACE/forwarding
        echo 1 > /proc/sys/net/ipv4/conf/$INETDEV/forwarding
 fi
@@ -60,7 +60,7 @@ if [ "$EVENT" = "DeviceRemoved" ]; then
        rm "$IFACEFILE"
        echo "$(date) Disabling tethering on device $IFACE" >> $LOG
        echo 0 > /proc/sys/net/ipv4/conf/$INETDEV/forwarding
-       start-stop-daemon -K -p "$RUNFILE" -x /usr/sbin/dnsmasq
+       /usr/sbin/start-stop-daemon -K -p "$RUNFILE" -x /usr/sbin/dnsmasq
        /usr/sbin/iptables -t nat -D POSTROUTING -o $INETDEV -j MASQUERADE
 fi