2019-10-30 19:24:12 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# blink 10 times to signal ready state
|
|
|
|
/usr/bin/bootblink 10 &
|
2019-10-31 12:56:27 +01:00
|
|
|
|
|
|
|
# if usb0 or eth0 are up
|
2019-10-30 19:24:12 +01:00
|
|
|
if [[ $(ifconfig | grep usb0 | grep RUNNING) ]] || [[ !$(grep '1' /sys/class/net/eth0/carrier) ]]; then
|
|
|
|
# if override file exists, go into auto mode
|
|
|
|
if [ -f /root/.pwnagotchi-auto ]; then
|
|
|
|
rm /root/.pwnagotchi-auto
|
|
|
|
/usr/local/bin/pwnagotchi
|
|
|
|
else
|
|
|
|
/usr/local/bin/pwnagotchi --manual
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
/usr/local/bin/pwnagotchi
|
|
|
|
fi
|