Compare commits

...

2 Commits

Author SHA1 Message Date
Dejvino
712c827f96 Merge branch 'master' of https://git.d5o.eu/dejvino/announcement-box 2020-12-14 14:22:20 +01:00
Dejvino
cf079a8c21 Add toolkit scripts 2020-12-14 14:22:01 +01:00
4 changed files with 60 additions and 0 deletions

18
toolkit/emergency-light Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
PIN_ELIGHT=7
# init
gpio mode $PIN_ELIGHT output
# command
if [[ "$1" == "on" ]]; then
gpio write $PIN_ELIGHT 1
elif [[ "$1" == "off" ]]; then
gpio write $PIN_ELIGHT 0
elif [[ "$1" == "read" ]]; then
gpio read $PIN_ELIGHT
else
gpio toggle $PIN_ELIGHT
fi

18
toolkit/pa-power Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
PIN_PAPOWER=5
# init
gpio mode $PIN_PAPOWER output
# command
if [[ "$1" == "on" ]]; then
gpio write $PIN_PAPOWER 1
elif [[ "$1" == "off" ]]; then
gpio write $PIN_PAPOWER 0
elif [[ "$1" == "read" ]]; then
gpio read $PIN_PAPOWER
else
gpio toggle $PIN_PAPOWER
fi

20
toolkit/system-activity-light Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
PIN_SALIGHT=11
# init
gpio mode $PIN_SALIGHT output
# command
if [[ "$1" == "on" ]]; then
gpio write $PIN_SALIGHT 1
elif [[ "$1" == "off" ]]; then
gpio write $PIN_SALIGHT 0
elif [[ "$1" == "read" ]]; then
gpio read $PIN_SALIGHT
elif [[ "$1" == "blink" ]]; then
gpio blink $PIN_SALIGHT $2 $3
else
gpio toggle $PIN_SALIGHT
fi

4
toolkit/system-usage Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
uptime | head -n 1 | cut -f3 -d, | cut -f2 -d: