misc: blink.sh becomes /usr/bin/bootblink in ansible build

This commit is contained in:
Simone Margaritelli 2019-10-05 22:30:23 +02:00
parent 01271acb92
commit 23e62ec68a
3 changed files with 17 additions and 13 deletions

View File

@ -244,6 +244,22 @@
#!/usr/bin/env bash
free -m | awk '/Mem/ { printf( "%d %", $3 / $2 * 100 + 0.5 ) }'
- name: create bootblink script
copy:
dest: /usr/bin/bootblink
mode: 0755
content: |
#!/usr/bin/env bash
for i in $(seq 1 "$1");
do
echo 0 >/sys/class/leds/led0/brightness
sleep 0.3
echo 1 >/sys/class/leds/led0/brightness
sleep 0.3
done
echo 0 >/sys/class/leds/led0/brightness
sleep 0.3
- name: create monstart script
copy:
dest: /usr/bin/monstart

View File

@ -1,12 +0,0 @@
#!/usr/bin/env bash
for i in $(seq 1 "$1");
do
echo 0 >/sys/class/leds/led0/brightness
sleep 0.3
echo 1 >/sys/class/leds/led0/brightness
sleep 0.3
done
echo 0 >/sys/class/leds/led0/brightness
sleep 0.3

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# blink 10 times to signal ready state
/root/pwnagotchi/scripts/blink.sh 10 &
/usr/bin/bootblink 10 &
# start a detached screen session with bettercap
if ifconfig | grep usb0 | grep RUNNING; then