Skip to content

Instantly share code, notes, and snippets.

@jabedude
Last active March 16, 2016 17:41
Show Gist options
  • Save jabedude/d18f048bbeeb3d64b64c to your computer and use it in GitHub Desktop.
Save jabedude/d18f048bbeeb3d64b64c to your computer and use it in GitHub Desktop.
Debian TCPDUMP service for RC4.D
#!/bin/bash
NAME=tcpDump
PIDFILE=/var/run/$NAME.pid
DAEMON=/usr/sbin/tcpdump
DAEMON_OPTS="-i eth0 -w /RL4/outfile.pcap"
mkdir /RL4
touch /RL4/outfile.pcap
case "$1" in
start)
start-stop-daemon --start --background --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
;;
stop)
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
rm -rf /RL4/
;;
*)
echo "USAGE: {start|stop}"
exit 1
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment