#!/bin/bash
# Always ensure this device is allowed to access TEMPer without root user access (after a reboot especially)
echo 'KERNEL=="hidraw1", MODE="0666"' > /etc/udev/rules.d/temper.rules
if [[ -e /dev/ttyUSB0 ]]; then
  chmod a+rw /dev/ttyUSB0
fi
if [[ -e /dev/ttyUSB1 ]]; then
  chmod a+rw /dev/ttyUSB1
fi
if [[ -e /dev/ttyUSB2 ]]; then
  chmod a+rw /dev/ttyUSB2
fi
if [[ -e /dev/ttyUSB3 ]]; then
  chmod a+rw /dev/ttyUSB3
fi

