All pastes #124224 Raw Edit

Untitled

public text v1 · immutable
#124224 ·published 2006-08-09 22:12 UTC
rendered paste body
#! /bin/sh

WIFI="rausb0"

dump_start() {
  if [ "`/sbin/ifconfig | grep $WIFI`" != "" ]; then 
      echo "Starting airodump-ng: "
      screen -D -m -S dump airodump-ng -w /root/cap/dump  -c 6 --ivs $WIFI
  fi
}

dump_stop() {
  `command to terminate screen with name "dump"`
}

dump_restart() {
  dump_stop
  sleep 2
  dump_start
}

case "$1" in
  'start')
    dump_start
    ;;

  'stop')
    dump_stop
    ;;
	
  'restart')
    dum_restart
    ;;

  *)
    echo "Usage: $0 start|stop|restart"
    ;;
esac