Advertisement
Guest User

rc.local

a guest
May 6th, 2015
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.22 KB | None | 0 0
  1. #!/bin/sh -e
  2. #
  3. # rc.local
  4. #
  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
  7. # value on error.
  8. #
  9. # In order to enable or disable this script just change the execution
  10. # bits.
  11. #
  12. # By default this script does nothing.
  13.  
  14. # Print the IP address
  15. _IP=$(hostname -I) || true
  16. if [ "$_IP" ]; then
  17.   printf "My IP address is %s\n" "$_IP"
  18. fi
  19.  
  20.  
  21. # Part of S0/Impulse to Volkszaehler 'RaspberryPI deamon'
  22. echo 17 > /sys/class/gpio/export && echo "rising" > /sys/class/gpio/gpio17/edge
  23. echo 18 > /sys/class/gpio/export && echo "rising" > /sys/class/gpio/gpio18/edge
  24. #echo 22 > /sys/class/gpio/export && echo "rising" > /sys/class/gpio/gpio22/edge
  25. #echo 23 > /sys/class/gpio/export && echo "rising" > /sys/class/gpio/gpio23/edge
  26. #echo 24 > /sys/class/gpio/export && echo "rising" > /sys/class/gpio/gpio24/edge
  27. #echo 10 > /sys/class/gpio/export && echo "rising" > /sys/class/gpio/gpio10/edge
  28.  
  29.  
  30. # Part of DS2482 I2C 1-Wire Master to Volkszaehler 'RaspberryPI deamon'.
  31. echo ds2482 0x18 > /sys/bus/i2c/devices/i2c-1/new_device
  32. echo ds2482 0x19 > /sys/bus/i2c/devices/i2c-1/new_device
  33. echo ds2482 0x1a > /sys/bus/i2c/devices/i2c-1/new_device
  34.  
  35. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement