Add modules to repository

This commit is contained in:
Sebastian Kinne
2017-11-16 16:42:22 +11:00
commit d0aa1e38ef
707 changed files with 96750 additions and 0 deletions

View 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
if grep addn-hosts /etc/dnsmasq.conf &> /dev/null; then
/etc/init.d/dnsmasq stop && /etc/init.d/dnsmasq start
else
echo "no-dhcp-interface=" >> /etc/dnsmasq.conf
echo "server=8.8.8.8" >> /etc/dnsmasq.conf
echo "no-hosts" >> /etc/dnsmasq.conf
echo "addn-hosts=/pineapple/modules/DNSMasqSpoof/hosts/dnsmasq.hosts" >> /etc/dnsmasq.conf
/etc/init.d/dnsmasq stop && /etc/init.d/dnsmasq start
fi

View File

@@ -0,0 +1,30 @@
#!/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/DNSMasqSpoof.progress ]] && {
exit 0
}
touch /tmp/DNSMasqSpoof.progress
if [ "$1" = "install" ]; then
if [ "$2" = "internal" ]; then
echo '' > /dev/null
elif [ "$2" = "sd" ]; then
echo '' > /dev/null
fi
touch /etc/config/dnsmasqspoof
echo "config dnsmasqspoof 'module'" > /etc/config/dnsmasqspoof
uci set dnsmasqspoof.module.installed=1
uci commit dnsmasqspoof.module.installed
elif [ "$1" = "remove" ]; then
rm -rf /etc/config/dnsmasqspoof
fi
rm /tmp/DNSMasqSpoof.progress

View File

@@ -0,0 +1,21 @@
#!/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
if [ "$1" = "start" ]; then
echo "no-dhcp-interface=" >> /etc/dnsmasq.conf
echo "server=8.8.8.8" >> /etc/dnsmasq.conf
echo "no-hosts" >> /etc/dnsmasq.conf
echo "addn-hosts=/pineapple/modules/DNSMasqSpoof/hosts/dnsmasq.hosts" >> /etc/dnsmasq.conf
/etc/init.d/dnsmasq stop && /etc/init.d/dnsmasq start
elif [ "$1" = "stop" ]; then
sed -i '/no-dhcp-interface=/d' /etc/dnsmasq.conf
sed -i '/server=8.8.8.8/d' /etc/dnsmasq.conf
sed -i '/no-hosts/d' /etc/dnsmasq.conf
sed -i '/addn-hosts=\/pineapple\/modules\/DNSMasqSpoof\/hosts\/dnsmasq.hosts/d' /etc/dnsmasq.conf
/etc/init.d/dnsmasq stop && /etc/init.d/dnsmasq start
fi