5 # This script is executed at the end of each multiuser runlevel.
6 # Make sure that the script will "exit 0" on success or any other
9 # In order to enable or disable this script just change the execution
12 # By default this script does nothing.
14 for gpio in 4 17 18 21 22 23; do
15 echo $gpio > /sys/class/gpio/export
16 echo out > /sys/class/gpio/gpio$gpio/direction
17 chown www-data /sys/class/gpio/gpio$gpio/value
21 # Print the IP address
22 _IP=$(hostname -I) || true
24 printf "My IP address is %s\n" "$_IP"
28 if ! ifconfig eth0 && ifconfig wlan0 ; then
30 while ((MAX_TRIES-- > 0)) && ! /sbin/wpa_cli status | grep -q wpa_state=COMPLETED; do
37 su realraum -s /bin/sh -c "sleep 10 && /home/realraum/play-sound-status.py /home/realraum/play-sound-status.cfg &>/dev/null &" &
38 su realraum -s /bin/sh -c "sleep 10 && /home/realraum/stuff.py &>/dev/null &" &