summaryrefslogtreecommitdiff
path: root/network/wifi-radar/rc.wifi-radar
diff options
context:
space:
mode:
Diffstat (limited to 'network/wifi-radar/rc.wifi-radar')
-rw-r--r--network/wifi-radar/rc.wifi-radar62
1 files changed, 0 insertions, 62 deletions
diff --git a/network/wifi-radar/rc.wifi-radar b/network/wifi-radar/rc.wifi-radar
deleted file mode 100644
index 488f148086..0000000000
--- a/network/wifi-radar/rc.wifi-radar
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh
-#
-# Start/Stop the WiFi-Radar daemon
-#
-
-# get the wifi interface from rc.inet1.conf if it is set
-. /etc/rc.d/rc.inet1.conf
-INTERFACE="${IFNAME[4]}"
-PIDFILE=/var/run/wifi.pid
-
-start() {
- # use the forced interface found in rc.inet1.conf or guess it
- [ ! "$INTERFACE" ] && INTERFACE="$(iwconfig 2>/dev/null | grep ESSID | head -n1 | cut -d " " -f 1)"
- sed -i "s/^[ \t]*interface[ \t]*=[ \t]*.*/interface = $INTERFACE/" /etc/wifi-radar.conf
-
- if [ -e "${PIDFILE}" ]; then
- echo "Found existing ${PIDFILE}! Stopping first before starting"
- stop
- fi
- echo "Starting WiFi-Radar: "
- /usr/sbin/wifi-radar --daemon 1> /dev/null 2> /dev/null &
- ps -e | grep wifi-radar | cut -d" " -f2 > ${PIDFILE}
-}
-
-stop() {
- echo "Stopping WiFi-Radar: "
- if [ -e "${PIDFILE}" ]; then
- kill $(cat ${PIDFILE}) 1> /dev/null 2> /dev/null
- rm -f ${PIDFILE}
- fi
-killall wifi-radar 1> /dev/null 2> /dev/null
-}
-
-restart() {
- stop
- sleep 2
- start
-}
-
-status() {
- if [ -e ${PIDFILE} ]; then
- echo "The WiFi-Radar daemon is running."
- else
- echo "The WiFi-Radar daemon is not running"
- fi
-}
-
-# See how we were called.
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- restart
- ;;
- *)
- echo $"Usage: $0 {start|stop|restart}"
- ;;
-esac