mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
Add modules to repository
This commit is contained in:
33
ngrep/scripts/dependencies.sh
Executable file
33
ngrep/scripts/dependencies.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
#2015 - Whistle Master
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||
|
||||
[[ -f /tmp/ngrep.progress ]] && {
|
||||
exit 0
|
||||
}
|
||||
|
||||
touch /tmp/ngrep.progress
|
||||
|
||||
if [ "$1" = "install" ]; then
|
||||
if [ "$2" = "internal" ]; then
|
||||
opkg update
|
||||
opkg install ngrep
|
||||
elif [ "$2" = "sd" ]; then
|
||||
opkg update
|
||||
opkg install ngrep --dest sd
|
||||
fi
|
||||
|
||||
touch /etc/config/ngrep
|
||||
echo "config ngrep 'module'" > /etc/config/ngrep
|
||||
|
||||
uci set ngrep.module.installed=1
|
||||
uci commit ngrep.module.installed
|
||||
|
||||
elif [ "$1" = "remove" ]; then
|
||||
opkg remove ngrep
|
||||
rm -rf /etc/config/ngrep
|
||||
fi
|
||||
|
||||
rm /tmp/ngrep.progress
|
||||
16
ngrep/scripts/ngrep.sh
Executable file
16
ngrep/scripts/ngrep.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
#2015 - Whistle Master
|
||||
|
||||
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=`cat /tmp/ngrep.run`
|
||||
|
||||
if [ "$1" = "start" ]; then
|
||||
eval ${MYCMD}
|
||||
rm -rf /tmp/ngrep.run
|
||||
elif [ "$1" = "stop" ]; then
|
||||
killall ngrep
|
||||
rm -rf /tmp/ngrep.run
|
||||
fi
|
||||
Reference in New Issue
Block a user