mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
Maintenance for a few modules (#42)
This commit is contained in:
@@ -5,21 +5,12 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||
|
||||
MYTIME=`date +%s`
|
||||
MYCMD="tcpdump `cat /tmp/tcpdump.run`"
|
||||
DUMPPATH='/pineapple/modules/tcpdump/dump/'
|
||||
|
||||
echo "Starting if"
|
||||
if [ ! -d "$DUMPPATH" ]; then
|
||||
# Control will enter here if $DUMPPATH doesn't exist.
|
||||
# Recursively make the path
|
||||
mkdir -p "$DUMPPATH"
|
||||
fi
|
||||
|
||||
MYCMD=`cat /tmp/tcpdump.run`
|
||||
|
||||
if [ "$1" = "start" ]; then
|
||||
eval ${MYCMD}
|
||||
rm -rf /tmp/tcpdump.run
|
||||
elif [ "$1" = "stop" ]; then
|
||||
killall tcpdump
|
||||
killall -9 tcpdump
|
||||
rm -rf /tmp/tcpdump.run
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user