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:
38
wps/scripts/dependencies.sh
Executable file
38
wps/scripts/dependencies.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/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/wps.progress ]] && {
|
||||
exit 0
|
||||
}
|
||||
|
||||
touch /tmp/wps.progress
|
||||
|
||||
if [ "$1" = "install" ]; then
|
||||
if [ "$2" = "internal" ]; then
|
||||
opkg update
|
||||
|
||||
opkg install reaver
|
||||
opkg install bully
|
||||
|
||||
elif [ "$2" = "sd" ]; then
|
||||
opkg update
|
||||
|
||||
opkg install reaver --dest sd
|
||||
opkg install bully --dest sd
|
||||
|
||||
fi
|
||||
|
||||
touch /etc/config/wps
|
||||
echo "config wps 'module'" > /etc/config/wps
|
||||
|
||||
uci set wps.module.installed=1
|
||||
uci commit wps.module.installed
|
||||
|
||||
elif [ "$1" = "remove" ]; then
|
||||
rm -rf /etc/config/wps
|
||||
fi
|
||||
|
||||
rm /tmp/wps.progress
|
||||
17
wps/scripts/wps.sh
Executable file
17
wps/scripts/wps.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/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/wps.run`
|
||||
|
||||
if [ "$1" = "start" ]; then
|
||||
eval ${MYCMD}
|
||||
elif [ "$1" = "stop" ]; then
|
||||
killall -9 reaver
|
||||
killall -9 bully
|
||||
|
||||
rm -rf /tmp/wps.run
|
||||
fi
|
||||
Reference in New Issue
Block a user