clock_autostart.sh 343 B

123456789101112
  1. #!/bin/bash
  2. if ! grep "luma.led_matrix" /etc/rc.local >/dev/null
  3. then
  4. sudo sed -i -e "s/exit 0//g" /etc/rc.local
  5. cat <<'EOF'>> /etc/rc.local
  6. _IP=$(hostname -I) || true
  7. python3 /mnt/dietpi_userdata/luma.led_matrix/examples/view_message.py -t "$_IP $_IP"
  8. python3 /mnt/dietpi_userdata/luma.led_matrix/examples/silly_clock.py &
  9. exit 0
  10. EOF
  11. fi