Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coderofsalvation/udev-autorun
udev rule + utility which automatically runs a shellscript on drives when plugged in (or asks for action like windows)
https://github.com/coderofsalvation/udev-autorun
Last synced: 12 days ago
JSON representation
udev rule + utility which automatically runs a shellscript on drives when plugged in (or asks for action like windows)
- Host: GitHub
- URL: https://github.com/coderofsalvation/udev-autorun
- Owner: coderofsalvation
- Created: 2013-10-19T17:59:13.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2020-05-28T19:30:29.000Z (over 4 years ago)
- Last Synced: 2023-03-24T12:56:23.611Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
udev-autorun
============udev rule which automatically runs a shellscript on drives when plugged in (or asks for action like windows)
### WHY ###
I wanted a idiotproof way to just run scripts on pluggable drives (aka the infamous autorun).
Udev seems very attractive at first, but before you know many hours are spent to figure out this beast.
I use many sd/smartmedia cards while Im making music with my hardware devices, so I wanted synchronisation and other
repetitive tasks to be automated: sometimes automatically, sometimes optional.This is a simple shellscript which facilitates all this.
### HOW ###
With `udev-autorun` you can just add several autorun scripts on your usb device, and automatically run or prompt tasks to the user. Its modular so the possibilities are unlimited
### INSTALL / GETTING STARTED ###
Do the following as *nonroot* user with sudo-privileges:
git clone https://github.com/coderofsalvation/udev-autorun.git
cd udev-autorun
./install.shNow start adding an example autorunmodule to your drive 'MySDCard'
udev-autorun init /media/MySDCard example
Now re-plugin your usb stick and see what happens.
If you are not running an graphical webenvironment (homeserver/headless) all modules are executed, else
you will see something like this:This means you can choose which action you want to perform, or just simply exit.
### EXAMPLE APPLICATIONS ###
* automatically copy pdf's from a certain folder to your ebook (upon connect)
* automatically copy mp3's from a certain folder to your mp3player
* automatically gather stats from internet and write as html/pdf to your ebook/hpc/etc
* automatically backup files from your usbdrives/flashcard to your harddrive
* automatically copy samples from your harddrive to your flashcard (for liveacts etc)
* trigger your coffeemachine when somebody plugs in a special usbdevice### CONCLUSION ###
Udev-autorun is your portal to bash shellscripting which really makes the unthinkable possible.