Skip to content

Instantly share code, notes, and snippets.

@stassats
Last active December 21, 2015 23:09
Show Gist options
  • Save stassats/6380750 to your computer and use it in GitHub Desktop.
Save stassats/6380750 to your computer and use it in GitHub Desktop.
#!/bin/sh
# /etc/udev/rules.d/garmin-edge.rules:
# SUBSYSTEM=="usb", ATTR{idVendor}=="091e", ATTR{idProduct}=="2491", ACTION=="add", RUN="/bin/su stas -c 'screen -d -m -S garmin ~/c/bin/upload-garmin'"
while ! mount /mnt/garmin; do
sleep 2
done
export PATH=$PATH:/usr/bin:/usr/local/bin
export DISPLAY=:0.0
~/c/bin/do-garmin-upload
umount /mnt/garmin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment