misc: refactored code to work as a setup.py based package

Signed-off-by: Simone Margaritelli <evilsocket@gmail.com>
This commit is contained in:
Simone Margaritelli
2019-10-05 23:23:31 +02:00
parent 6b4bfb6992
commit cbf7511e17
72 changed files with 160 additions and 214 deletions

View File

@ -260,6 +260,21 @@
echo 0 >/sys/class/leds/led0/brightness
sleep 0.3
- name: create pwnagotchi-launcher script
copy:
dest: /usr/bin/pwnagotchi-launcher
mode: 0755
content: |
#!/usr/bin/env bash
# blink 10 times to signal ready state
/usr/bin/bootblink 10 &
# start a detached screen session with bettercap
if ifconfig | grep usb0 | grep RUNNING; then
/usr/bin/pwnagotchi --manual
else
/usr/bin/pwnagotchi
fi
- name: create monstart script
copy:
dest: /usr/bin/monstart
@ -286,6 +301,13 @@
fi
/root/pwnagotchi/scripts/startup.sh &
- name: create /etc/pwnagotchi/config.yml
blockinfile:
path: /etc/pwnagotchi/config.yml
create: yes
block: |
# put here your custom configuration overrides
- name: configure lo interface
blockinfile:
path: /etc/network/interfaces.d/lo-cfg