Mercurial > templog
view py/setup_gpio.sh @ 518:0b5ff341d124
sleep on a semaphore so it can start/stop immediately when there's a SIGHUP
from the web UI. makes it seem more magical.
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 19 Dec 2014 21:52:50 +0800 |
parents | dce9f7841696 |
children | 659953f2ee03 |
line wrap: on
line source
#!/bin/sh # this must run as root PINS="17 7 24 25" GROUP=fridgeio for PIN in $PINS; do echo $PIN > /sys/class/gpio/export for f in direction value; do fn=/sys/devices/virtual/gpio/gpio$PIN/$f chgrp $GROUP $fn chmod g+rw $fn done done